|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Blocks the running of a specified stream or multiple streams until the specified event is complete. This API is asynchronous.
All subsequent tasks submitted to the stream can be executed only after all tasks captured by the event are complete. For more details, see acl.rt.record_event.
1
|
aclError aclrtStreamWaitEvent(aclrtStream stream, aclrtEvent event) |
1
|
ret = acl.rt.stream_wait_event(stream, event) |
|
Parameter |
Description |
|---|---|
|
stream |
Int, pointer address of the stream that needs to wait for the event to complete. Pass 0 if the default stream is used. |
|
event |
Int, pointer address of the event to be waited for. |
|
Return Value |
Description |
|---|---|
|
ret |
Int, error code. 0 on success; else, failure. |
API call sequence: acl.rt.create_event-->acl.rt.record_event-->acl.rt.stream_wait_event-->acl.rt.reset_event
The acl.rt.stream_wait_event API is an asynchronous API. If the API is successfully called, the task is successfully delivered but not executed. Therefore, if the waiting time exceeds the configured timeout interval, an error is returned after the acl.rt.synchronize_stream API is called.
For the API call example, see Event Synchronization and Synchronous Wait of Tasks Between Streams (Implemented Using Events).