aclrtQueryEventStatus

Description

Queries the execution status of all tasks captured in an event. For more details, see aclrtRecordEvent.

Restrictions

If aclrtRecordEvent and aclrtQueryEventStatus are called on different threads, the execution time of the two APIs may be out of order. As a result, the completion status of the queried event object does not meet the expectation.

Prototype

aclError aclrtQueryEventStatus(aclrtEvent event, aclrtEventRecordedStatus *status)

Parameters

Parameter

Input/Output

Description

event

Input

Event to query.

status

Output

Pointer to the event status.

If all tasks captured in the event are completed, ACL_EVENT_RECORDED_STATUS_COMPLETE is returned. If any task is not completed, ACL_EVENT_RECORDED_STATUS_NOT_READY is returned.

Returns

The value 0 indicates success, and other values indicate failure. For details, see aclError.