Function: get_context
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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 Values
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