Function: get_context
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the context of a thread.
Prototype
- C Prototype
1aclError aclrtGetCurrentContext(aclrtContext context)
- Python Function
1context, ret = acl.rt.get_context()
Parameter Description
None.
Return Value Description
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