ttg_parsec::TTValue< DerivedT > Struct Template Reference
Inheritance diagram for ttg_parsec::TTValue< DerivedT >:
ttg_parsec::detail::ttg_data_copy_container_setter< ttg_parsec::detail::ttg_data_copy_t > ttg_parsec::detail::ttg_data_copy_t ttg_parsec::detail::ttg_data_copy_self_t

Documentation

template<typename DerivedT>
struct ttg_parsec::TTValue< DerivedT >

Base class for data to moved into, through, and out of a task graph. By inheriting from this base class, TTG is able to easily track the data and avoid some of the copies otherwise necessary.

Definition at line 17 of file ttvalue.h.

Public Types

using derived_type = std::decay_t< DerivedT >
 
- Public Types inherited from ttg_parsec::detail::ttg_data_copy_t
using iterator = ttg_parsec_data_wrapper_t **
 
using iovec_iterator = typename std::vector< ttg::iovec >::iterator
 

Public Member Functions

 TTValue ()
 
 TTValue (const TTValue &v)
 
 TTValue (TTValue &&v)
 
virtual ~TTValue ()=default
 
TTValueoperator= (const TTValue &v)
 
TTValueoperator= (TTValue &&v)
 
virtual void * get_ptr () override final
 
derived_typeget_derived ()
 
const derived_typeget_derived () const
 
- Public Member Functions inherited from ttg_parsec::detail::ttg_data_copy_t
 ttg_data_copy_t ()
 
 ttg_data_copy_t (const ttg_data_copy_t &c)
 
 ttg_data_copy_t (ttg_data_copy_t &&c)
 
ttg_data_copy_toperator= (ttg_data_copy_t &&c)
 
ttg_data_copy_toperator= (const ttg_data_copy_t &c)
 
virtual ~ttg_data_copy_t ()=default
 
bool is_mutable () const
 
void mark_mutable ()
 
template<bool Atomic = true>
int increment_readers ()
 
void reset_readers ()
 
template<bool Atomic = true>
int decrement_readers ()
 
int num_readers () const
 
parsec_task_t * get_next_task () const
 
void set_next_task (parsec_task_t *task)
 
int32_t add_ref ()
 
int32_t drop_ref ()
 
bool has_ref ()
 
int32_t num_ref () const
 
void inc_current_version ()
 
void transfer_ownership (int access, int device=0)
 
void add_device_data (ttg_parsec_data_wrapper_t *data)
 
void remove_device_data (ttg_parsec_data_wrapper_t *data)
 
int num_dev_data () const
 
template<typename Fn >
void foreach_wrapper (Fn &&fn)
 
template<typename Fn >
void foreach_parsec_data (Fn &&fn)
 
iovec_iterator iovec_begin ()
 
iovec_iterator iovec_end ()
 
void iovec_reset ()
 
void iovec_add (const ttg::iovec &iov)
 
ttg::span< ttg::ioveciovec_span ()
 
std::size_t iovec_count () const
 
- Public Member Functions inherited from ttg_parsec::detail::ttg_data_copy_self_t
 ttg_data_copy_self_t (ttg_data_copy_t *dc)
 

Additional Inherited Members

- Public Attributes inherited from ttg_parsec::detail::ttg_data_copy_self_t
parsec_list_item_t super
 
ttg_data_copy_tself
 
- Static Public Attributes inherited from ttg_parsec::detail::ttg_data_copy_t
static constexpr int mutable_tag = std::numeric_limits<int>::min()
 
- Protected Attributes inherited from ttg_parsec::detail::ttg_data_copy_t
parsec_task_t * m_next_task = nullptr
 
int32_t m_readers = 1
 
std::atomic< int32_t > m_refs = 1
 
std::vector< ttg::iovecm_iovecs
 
std::vector< ttg_parsec_data_wrapper_t * > m_dev_data
 
ttg_parsec_data_wrapper_tm_single_dev_data
 
int m_num_dev_data = 0
 

Member Typedef Documentation

◆ derived_type

template<typename DerivedT >
using ttg_parsec::TTValue< DerivedT >::derived_type = std::decay_t<DerivedT>

Definition at line 20 of file ttvalue.h.

Constructor & Destructor Documentation

◆ TTValue() [1/3]

template<typename DerivedT >
ttg_parsec::TTValue< DerivedT >::TTValue ( )
inline

Definition at line 23 of file ttvalue.h.

◆ TTValue() [2/3]

template<typename DerivedT >
ttg_parsec::TTValue< DerivedT >::TTValue ( const TTValue< DerivedT > &  v)
inline

Definition at line 29 of file ttvalue.h.

◆ TTValue() [3/3]

template<typename DerivedT >
ttg_parsec::TTValue< DerivedT >::TTValue ( TTValue< DerivedT > &&  v)
inline

Definition at line 35 of file ttvalue.h.

◆ ~TTValue()

template<typename DerivedT >
virtual ttg_parsec::TTValue< DerivedT >::~TTValue ( )
virtualdefault

Member Function Documentation

◆ get_derived() [1/2]

template<typename DerivedT >
derived_type& ttg_parsec::TTValue< DerivedT >::get_derived ( )
inline

Definition at line 61 of file ttvalue.h.

◆ get_derived() [2/2]

template<typename DerivedT >
const derived_type& ttg_parsec::TTValue< DerivedT >::get_derived ( ) const
inline

Definition at line 65 of file ttvalue.h.

◆ get_ptr()

template<typename DerivedT >
virtual void* ttg_parsec::TTValue< DerivedT >::get_ptr ( )
inlinefinaloverridevirtual

Implements ttg_parsec::detail::ttg_data_copy_t.

Definition at line 57 of file ttvalue.h.

◆ operator=() [1/2]

template<typename DerivedT >
TTValue& ttg_parsec::TTValue< DerivedT >::operator= ( const TTValue< DerivedT > &  v)
inline

Definition at line 44 of file ttvalue.h.

◆ operator=() [2/2]

template<typename DerivedT >
TTValue& ttg_parsec::TTValue< DerivedT >::operator= ( TTValue< DerivedT > &&  v)
inline

Definition at line 51 of file ttvalue.h.


The documentation for this struct was generated from the following files: