pub unsafe extern "C" fn cudaExecutionCtxWaitEvent(
ctx: cudaExecutionContext_t,
event: cudaEvent_t,
) -> cudaError_tExpand description
Make an execution context wait on an event.
Makes all future work submitted to execution context ctx wait for all work captured in event. The synchronization will be performed on the device and will not block the calling CPU thread. See cudaExecutionCtxRecordEvent for details on what is captured by an event. If the execution context passed to ctx is the device (primary) context obtained via cudaDeviceGetExecutionCtx, all green contexts created on the device will wait for event as well.
Note: event may be from a different execution context or device than ctx.
Note: The API will return cudaError_t::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and invalidate the capture if the specified event event is part of an ongoing capture sequence or if the specified execution context ctx has a stream in the capture mode.
Note that this function may also return error codes from previous, asynchronous launches.
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.
Note: The context parameter is required and the API ignores the context that is current to the calling thread. This enables explicit context-based programming without relying on thread-local state. If no context is specified, the API will return cudaError_t::CUDA_ERROR_INVALID_VALUE.
§Parameters
ctx: Execution context to wait for (required parameter, see note below).event: Event to wait on.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_DEINITIALIZEDcudaError_t::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED
See also: cudaExecutionCtxRecordEvent, cudaStreamWaitEvent, cuCtxWaitEvent, cuGreenCtxWaitEvent.