pub unsafe extern "C" fn cudaEventCreateWithFlags(
event: *mut cudaEvent_t,
flags: c_uint,
) -> cudaError_tExpand description
Creates an event object with the specified flags.
Creates an event object for the current device with the specified flags. Valid flags include:
- cudaEventDefault: Default event creation flag.
- cudaEventBlockingSync: Specifies that event should use blocking synchronization. A host thread that uses
cudaEventSynchronizeto wait on an event created with this flag will block until the event actually completes. - cudaEventDisableTiming: Specifies that the created event does not need to record timing data. Events created with this flag specified and the cudaEventBlockingSync flag not specified will provide the best performance when used with
cudaStreamWaitEventandcudaEventQuery. - cudaEventInterprocess: Specifies that the created event may be used as an interprocess event by
cudaIpcGetEventHandle. cudaEventInterprocess must be specified along with cudaEventDisableTiming.
Note that this function may also return error codes from previous, asynchronous launches.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
event: Newly created event.flags: Flags for new event.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaError_t::CUDA_ERROR_LAUNCH_FAILEDcudaError_t::CUDA_ERROR_OUT_OF_MEMORY
See also: cudaEventCreate (C API), cudaEventSynchronize, cudaEventDestroy, cudaEventElapsedTime, cudaStreamWaitEvent, cuEventCreate.