#include <taskflow/cuda/cuda_stream.hpp>
template<typename Creator, typename Deleter>
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::, 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
cudaEventobject by passing the given arguments to the event creator - cudaEventBase(cudaEventBase&&) defaulted
- constructs a
cudaEventfrom the given rhs using move semantics
Public functions
- auto operator=(cudaEventBase&&) -> cudaEventBase& defaulted
- assign the rhs to
*thisusing 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:: 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