|
Records an event. If stream is non-zero, the event is recorded after all preceding operations in stream have been completed; otherwise, it is recorded after all preceding operations in the CUDA context have been completed. Since operation is asynchronous, cudaEventQuery() and/or cudaEventSynchronize() must be used to determine when the event has actually been recorded.
If cudaEventRecord() has previously been called on event , then this call will overwrite any existing state in event . Any subsequent calls which examine the status of event will only examine the completion of this most recent call to cudaEventRecord().
- Parameters:
-
| event | - Event to record |
| stream | - Stream in which to record event |
- Returns:
- cudaSuccess, cudaErrorInvalidValue, cudaErrorInitializationError, cudaErrorInvalidResourceHandle, cudaErrorLaunchFailure
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaEventCreate (C API), cudaEventCreateWithFlags, cudaEventQuery, cudaEventSynchronize, cudaEventDestroy, cudaEventElapsedTime, cudaStreamWaitEvent
|