|
Records an event. If hStream is non-zero, the event is recorded after all preceding operations in hStream have been completed; otherwise, it is recorded after all preceding operations in the CUDA context have been completed. Since operation is asynchronous, cuEventQuery and/or cuEventSynchronize() must be used to determine when the event has actually been recorded.
If cuEventRecord() has previously been called on hEvent , then this call will overwrite any existing state in hEvent . Any subsequent calls which examine the status of hEvent will only examine the completion of this most recent call to cuEventRecord().
It is necessary that hEvent and hStream be created on the same context.
- Parameters:
-
| hEvent | - Event to record |
| hStream | - Stream to record event for |
- Returns:
- CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cuEventCreate, cuEventQuery, cuEventSynchronize, cuStreamWaitEvent, cuEventDestroy, cuEventElapsedTime
|