Blocks the running of a specified stream or multiple streams until the specified event is complete. This API is asynchronous.
API call sequence: aclrtCreateEvent --> aclrtRecordEvent --> aclrtStreamWaitEvent --> aclrtResetEvent
The aclrtStreamWaitEvent API is an asynchronous API. Successful API calling only indicates that the task is successfully delivered but not executed. Therefore, if the wait time exceeds the configured timeout interval, an error is reported after the aclrtSynchronizeStream API is called.
aclError aclrtStreamWaitEvent(aclrtStream stream, aclrtEvent event)
Parameter |
Input/Output |
Description |
|---|---|---|
stream |
Input |
Stream to wait. To specify the default stream, pass NULL. |
event |
Input |
Event to wait on. |
0 on success; else, failure.