pub unsafe extern "C" fn cudaEventSynchronize(
event: cudaEvent_t,
) -> cudaError_tExpand description
Waits for an event to complete.
Waits until the completion of all work currently captured in event. See cudaEventRecord for details on what is captured by an event.
Waiting for an event that was created with the cudaEventBlockingSync flag will cause the calling CPU thread to block until the event has been completed by the device. If the cudaEventBlockingSync flag has not been set, then the CPU thread will busy-wait until the event has been completed by the device.
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.
Note: Returns cudaError_t::CUDA_ERROR_INVALID_HANDLE in the event of being passed NULL as the input event.
§Parameters
event: Event to wait for
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaError_t::CUDA_ERROR_INVALID_HANDLEcudaError_t::CUDA_ERROR_LAUNCH_FAILED
See also: cudaEventCreate (C API), cudaEventCreateWithFlags, cudaEventRecord, cudaEventQuery, cudaEventDestroy, cudaEventElapsedTime, cuEventSynchronize.