pub unsafe extern "C" fn cudaStreamWaitEvent(
stream: cudaStream_t,
event: cudaEvent_t,
flags: c_uint,
) -> cudaError_tExpand description
Make a compute stream wait on an event.
Makes all future work submitted to stream wait for all work captured in event. See cudaEventRecord for details on what is captured by an event. The synchronization will be performed efficiently on the device when applicable. event may be from a different device than stream.
flags include:
- cudaEventWaitDefault: Default event creation flag.
- cudaEventWaitExternal: Event is captured in the graph as an external event node when performing stream capture.
Note: This function uses standard default stream semantics.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
stream: Stream to wait.event: Event to wait on.flags: Parameters for the operation(See above).
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaError_t::CUDA_ERROR_INVALID_HANDLE
See also: cudaStreamCreate, cudaStreamCreateWithFlags, cudaStreamQuery, cudaStreamSynchronize, cudaStreamAddCallback, cudaStreamDestroy, cuStreamWaitEvent.