Function rcudnn_sys::cudaEventRecord[][src]

pub unsafe extern "C" fn cudaEventRecord(
    event: cudaEvent_t,
    stream: cudaStream_t
) -> cudaError_t
Expand description

\brief Records an event

Captures in \p event the contents of \p stream at the time of this call. \p event and \p stream must be on the same device. Calls such as ::cudaEventQuery() or ::cudaStreamWaitEvent() will then examine or wait for completion of the work that was captured. Uses of \p stream after this call do not modify \p event. See note on default stream behavior for what is captured in the default case.

::cudaEventRecord() can be called multiple times on the same event and will overwrite the previously captured state. Other APIs such as ::cudaStreamWaitEvent() use the most recently captured state at the time of the API call, and are not affected by later calls to ::cudaEventRecord(). Before the first call to ::cudaEventRecord(), an event represents an empty set of work, so for example ::cudaEventQuery() would return ::cudaSuccess.

\param event - Event to record \param stream - Stream in which to record event

\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidResourceHandle, ::cudaErrorLaunchFailure \note_null_stream \notefnerr \note_init_rt \note_callback

\sa \ref ::cudaEventCreate(cudaEvent_t*) “cudaEventCreate (C API)”, ::cudaEventCreateWithFlags, ::cudaEventQuery, ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime, ::cudaStreamWaitEvent, ::cudaEventRecordWithFlags, ::cuEventRecord