tf::cudaEvent class

class to create a CUDA event in an RAII-styled wrapper

A cudaEvent object is an RAII-styled wrapper over a native CUDA stream (cudaEvent_t). A cudaEvent object is move-only.

Constructors, destructors, conversion operators

cudaEvent(cudaEvent_t event) explicit
constructs an RAII-styled object from the given CUDA event
cudaEvent()
constructs an RAII-styled object for a new CUDA event
cudaEvent(const cudaEvent&) deleted
disabled copy constructor
cudaEvent(cudaEvent&& rhs)
move constructor
~cudaEvent()
destructs the CUDA event
operator cudaEvent_t() const
implicit conversion to the native CUDA event (cudaEvent_t)

Public functions

auto operator=(const cudaEvent&) -> cudaEvent& deleted
disabled copy assignment
auto operator=(cudaEvent&& rhs) -> cudaEvent&
move assignment
void reset(cudaEvent_t event = nullptr)
replaces the managed event

Function documentation

tf::cudaEvent::operator cudaEvent_t() const

implicit conversion to the native CUDA event (cudaEvent_t)

Returns the underlying event of type cudaEvent_t.

void tf::cudaEvent::reset(cudaEvent_t event = nullptr)

replaces the managed event

Destructs the managed event and resets it to the given event.