| Taskflow: A General-purpose Task-parallel Programming System

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
tf::cudaEventBase< Creator, Deleter > Class Template Reference

class to create a CUDA event with unique ownership More...

`#include <taskflow/cuda/cuda_stream.hpp>`

Inheritance diagram for tf::cudaEventBase< Creator, Deleter >:
[legend]
Collaboration diagram for tf::cudaEventBase< Creator, Deleter >:
[legend]

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

## Public Member Functions
template<typename... ArgsT>
| cudaEventBase (ArgsT &&... args)
| constructs a `cudaEvent` object by passing the given arguments to the event creator
| cudaEventBase (cudaEventBase &&)=default
| constructs a `cudaEvent` from the given rhs using move semantics
cudaEventBase & | operator= (cudaEventBase &&)=default
| assign the rhs to `*this` using move semantics

## Detailed Description

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

class to create a CUDA event with unique ownership

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.

## Member Typedef Documentation

## ◆ base_type

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.

## Constructor & Destructor Documentation

## ◆ cudaEventBase()

template<typename Creator , typename Deleter >
template<typename... ArgsT>

tf::cudaEventBase< Creator, Deleter >::cudaEventBase | ( | ArgsT &&... | args | ) |
| inline explicit

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

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

Parameters

  args | arguments to pass to the event creator

The documentation for this class was generated from the following file:

- taskflow/cuda/cuda_stream.hpp