Function: get_context
Description
Obtains the context of a thread.
Prototype
- C Prototype
1aclError aclrtGetCurrentContext(aclrtContext context)
- Python Function
1context, ret = acl.rt.get_context()
Parameters
None
Return Value
Return Value |
Description |
|---|---|
context |
Int, pointer address of the created context object. |
ret |
Int, error code. 0 on success; else, failure. |
Restrictions
If you call acl.rt.set_context multiple times to set the context of the current thread, the context set last time is obtained.
Parent topic: Context Management