Function: get_primary_ctx_state
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains the status of the default context.
Prototype
- C Prototype
aclError aclrtGetPrimaryCtxState(int32_t deviceId, uint32_t *flags, int32_t *active)
- Python Function
1active, flags, ret = acl.rt.get_primary_ctx_state(device_id)
Parameter Description
Parameter |
Description |
|---|---|
device_id |
Int, device ID. |
Return Value Description
Return Value |
Description |
|---|---|
active |
Int, pointer to the status of the default context. 0: deactivated; 1: activated. |
flags |
Int, reserved value. Currently, the value is fixed to 0. |
ret |
Int, 0 on success; else, failure. |
Parent topic: Context Management