aclrtResetEvent
Description
Resets an event. Resets the event only after all tasks in the stream are completely executed. This API is asynchronous.
Restrictions
- Events created using the aclrtCreateEventExWithFlag API cannot be called to this API.
- This API is asynchronous. The API call delivers a task rather than executes a task. After this API is called, you need to call a synchronization API (for example, aclrtSynchronizeStream) to ensure that the task is complete. Otherwise, service exceptions (such as training or inference exception) or unknown situations (such as device link or card disconnection) may occur.
Prototype
aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
event |
Input |
Event to reset. |
stream |
Input |
Stream. For example, in the Stream1 scenario such as Stream2, set this parameter to Stream2. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Parent topic: Event Management