Back to Taskflow

template<typename Creator, typename Deleter> tf::cudaEventBase class

docs/classtf_1_1cudaEventBase.html

4.0.02.3 KB
Original Source

template<typename Creator, typename Deleter> tf::cudaEventBase class

class to create a CUDA event with unique ownership

Template parameters
Creator
Deleter

The cudaEventBase class encapsulates a cudaEvent_t using std::unique_ptr, ensuring that CUDA events are properly created and destroyed with a unique ownership.

Public types

using base_type = std::unique_ptr<std::remove_pointer_t<cudaEvent_t>, Deleter> base type for the underlying unique pointer

Constructors, destructors, conversion operators

template<typename... ArgsT> cudaEventBase(ArgsT && ... args) explicit constructs a cudaEvent object by passing the given arguments to the event creatorcudaEventBase(cudaEventBase&&) defaultedconstructs a cudaEvent from the given rhs using move semantics

Public functions

auto operator=(cudaEventBase&&) -> cudaEventBase& defaultedassign the rhs to *this using move semantics

Typedef documentation

template<typename Creator, typename Deleter> using tf::cudaEventBase<Creator, Deleter>::base_type = std::unique_ptr<std::remove_pointer_t<cudaEvent_t>, Deleter>

base type for the underlying unique pointer

This alias provides a shorthand for the underlying std::unique_ptr type that manages CUDA event resources with an associated deleter.

Function documentation

template<typename Creator, typename Deleter> template<typename... ArgsT> tf::cudaEventBase<Creator, Deleter>::cudaEventBase(ArgsT && ... args) explicit

constructs a cudaEvent object by passing the given arguments to the event creator

Parameters
args

Constructs a cudaEvent object by passing the given arguments to the event creator