Skip to main content

cudaEventCreateWithFlags

Function cudaEventCreateWithFlags 

Source
pub unsafe extern "C" fn cudaEventCreateWithFlags(
    event: *mut cudaEvent_t,
    flags: c_uint,
) -> cudaError_t
Expand description

Creates an event object with the specified flags.

Creates an event object for the current device with the specified flags. Valid flags include:

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

See also: cudaEventCreate (C API), cudaEventSynchronize, cudaEventDestroy, cudaEventElapsedTime, cudaStreamWaitEvent, cuEventCreate.