Function cuCtxWaitEvent

Source
pub unsafe extern "C" fn cuCtxWaitEvent(
    hCtx: CUcontext,
    hEvent: CUevent,
) -> CUresult
Expand description

\brief Make a context wait on an event

Makes all future work submitted to context \p hCtx wait for all work captured in \p hEvent. The synchronization will be performed on the device and will not block the calling CPU thread. See ::cuCtxRecordEvent() for details on what is captured by an event. If the context passed to \p hCtx is the primary context, the primary context and its green contexts will wait for \p hEvent. If the context passed to \p hCtx is a context converted from green context via ::cuCtxFromGreenCtx(), the green context will wait for \p hEvent.

\note \p hEvent may be from a different context or device than \p hCtx.

\note The API will return ::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and invalidate the capture if the specified event \p hEvent is part of an ongoing capture sequence or if the specified context \p hCtx has a stream in the capture mode.

\param hCtx - Context to wait \param hEvent - Event to wait on

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED

\sa ::cuCtxRecordEvent, ::cuGreenCtxRecordEvent, ::cuGreenCtxWaitEvent, ::cuStreamWaitEvent