aclrtStreamWaitEvent
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Blocks a specified stream until the specified event is complete. This is an asynchronous API.
This is an encapsulated API that applies only to C++ programs. It internally calls the C API aclrtStreamWaitEventWithTimeout.
Prototype
1 | aclError aclrtStreamWaitEvent(aclrtStream stream, aclrtEvent event, int32_t timeout) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
stream |
Input |
Stream. For details about the type definition, see aclrtStream. For stream synchronization, for example, Stream2 waits for Stream1, set this parameter to Stream2. |
event |
Input |
Event to wait on. For details about the type definition, see aclrtEvent. |
timeout |
Input |
Timeout interval. The value can be:
|
Returns
0 on success; otherwise, failure. For details, see aclError.