aclrtGetPrimaryCtxState
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Obtains the status of the default context.
Prototype
aclError aclrtGetPrimaryCtxState(int32_t deviceId, uint32_t *flags, int32_t *active)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
deviceId |
Input |
Default context of a specified device. Must be in the range of [0, Device count – 1]. Call aclrtGetDeviceCount to obtain the device count. |
flags |
Output |
Reserved. Currently, the value is fixed to NULL. |
active |
Output |
Pointer to the status of the default context. The status values are as follows:
|
Returns
0 on success; else, failure. For details, see aclError.
Parent topic: Context Management