Function cuEventRecord

Source
pub unsafe extern "C" fn cuEventRecord(
    hEvent: CUevent,
    hStream: CUstream,
) -> 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.

::cuEventRecord() 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 ::cuEventRecord(). Before the first call to ::cuEventRecord(), an event represents an empty set of work, so for example ::cuEventQuery() would return ::CUDA_SUCCESS.

\param hEvent - Event to record \param hStream - Stream to record event for

\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, ::cudaEventRecord, ::cuEventRecordWithFlags