CUresult cuEventSynchronize ( CUevent  hEvent  ) 

Wait until the completion of all device work preceding the most recent call to cuEventRecord() (in the appropriate compute streams, as specified by the arguments to cuEventRecord()).

If cuEventRecord() has not been called on hEvent, CUDA_SUCCESS is returned immediately.

Waiting for an event that was created with the CU_EVENT_BLOCKING_SYNC flag will cause the calling CPU thread to block until the event has been completed by the device. If the CU_EVENT_BLOCKING_SYNC flag has not been set, then the CPU thread will busy-wait until the event has been completed by the device.

Parameters:
hEvent - Event to wait for
Returns:
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cuEventCreate, cuEventRecord, cuEventQuery, cuEventDestroy, cuEventElapsedTime


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA