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

class to create a smart pointer wrapper for managing cudaEvent_t

Template parameters
Creator functor to create the stream (used in constructor)
Deleter functor to delete the stream (used in destructor)

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 creator
operator cudaEvent_t() const noexcept
implicit conversion to the underlying cudaEvent_t object

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 arguments to pass to the event creator

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

template<typename Creator, typename Deleter>
tf::cudaEventBase<Creator, Deleter>::operator cudaEvent_t() const noexcept

implicit conversion to the underlying cudaEvent_t object

Returns the underlying cudaEvent_t object, equivalently calling base_type::get().