pub unsafe extern "C" fn cuEventRecordWithFlags(
hEvent: CUevent,
hStream: CUstream,
flags: c_uint,
) -> CUresult
Expand description
\brief Records an event
Captures in \p hEvent the contents of \p hStream at the time of this call. \p hEvent and \p hStream must be from the same context otherwise ::CUDA_ERROR_INVALID_HANDLE is returned. Calls such as ::cuEventQuery() or ::cuStreamWaitEvent() will then examine or wait for completion of the work that was captured. Uses of \p hStream after this call do not modify \p hEvent. See note on default stream behavior for what is captured in the default case.
::cuEventRecordWithFlags() can be called multiple times on the same event and will overwrite the previously captured state. Other APIs such as ::cuStreamWaitEvent() use the most recently captured state at the time of the API call, and are not affected by later calls to ::cuEventRecordWithFlags(). Before the first call to ::cuEventRecordWithFlags(), an event represents an empty set of work, so for example ::cuEventQuery() would return ::CUDA_SUCCESS.
flags include:
- ::CU_EVENT_RECORD_DEFAULT: Default event creation flag.
- ::CU_EVENT_RECORD_EXTERNAL: Event is captured in the graph as an external event node when performing stream capture. This flag is invalid outside of stream capture.
\param hEvent - Event to record \param hStream - Stream to record event for \param flags - See ::CUevent_capture_flags
\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_HANDLE, ::CUDA_ERROR_INVALID_VALUE \note_null_stream \notefnerr
\sa ::cuEventCreate, ::cuEventQuery, ::cuEventSynchronize, ::cuStreamWaitEvent, ::cuEventDestroy, ::cuEventElapsedTime, ::cuEventRecord, ::cudaEventRecord