aclrtGetCurrentContext

Description

Obtains the bound context of a thread. This API is synchronous.

If you call aclrtSetCurrentContext multiple times to bind the context of the current thread, the context bound last time is obtained.

Prototype

aclError aclrtGetCurrentContext(aclrtContext *context)

Parameters

Parameter

Input/Output

Description

context

Output

Pointer to the current context of a thread.

Returns

0 on success; else, failure.