aclrtGetCurrentContext

Description

Obtains the context of a thread.

Restrictions

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

The value 0 indicates success, and other values indicate failure. For details, see aclError.