CUresult cuStreamWaitEvent ( CUstream  hStream,
CUevent  hEvent,
unsigned int  Flags 

Makes all future work submitted to hStream wait until hEvent reports completion before beginning execution. This synchronization will be performed efficiently on the device.

The stream hStream will wait only for the completion of the most recent host call to cuEventRecord() on hEvent. Once this call has returned, any functions (including cuEventRecord() and cuEventDestroy()) may be called on hEvent again, and the subsequent calls will not have any effect on hStream.

If hStream is 0 (the NULL stream) any future work submitted in any stream will wait for hEvent to complete before beginning execution. This effectively creates a barrier for all future work submitted to the context.

If cuEventRecord() has not been called on hEvent, this call acts as if the record has already completed, and so is a functional no-op.

hStream - Stream to wait
hEvent - Event to wait on (may not be NULL)
Flags - Parameters for the operation (must be 0)
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cuStreamCreate, cuEventRecord, cuStreamQuery, cuStreamSynchronize, cuStreamDestroy

Generated by Doxygen for NVIDIA CUDA Library  NVIDIA