ttg::TTG< input_terminalsT, output_terminalsT > Class Template Reference
Inheritance diagram for ttg::TTG< input_terminalsT, output_terminalsT >:
ttg::TTBase

Documentation

template<typename input_terminalsT, typename output_terminalsT>
class ttg::TTG< input_terminalsT, output_terminalsT >

a template task graph implementation

It contains (owns) one or more TT objects. Since it can also be viewed as a TT object itself, it is a TTBase and can be for recursive composition of TTG objects.

Template Parameters
input_terminalsTa tuple of pointers to input terminals
output_terminalsTa tuple of pointers to output terminals

Definition at line 31 of file tt.h.

Public Types

using input_terminals_type = input_terminalsT
 
using output_terminals_type = output_terminalsT
 

Public Member Functions

template<typename ttseqT >
 TTG (ttseqT &&tts, const input_terminals_type &ins, const output_terminals_type &outs, const std::string &name="ttg")
 
template<std::size_t i>
auto in ()
 Return a pointer to i'th input terminal. More...
 
template<std::size_t i>
auto out ()
 Return a pointer to i'th output terminal. More...
 
TTBaseget_op (std::size_t i)
 
ttg::World get_world () const override final
 
void fence () override
 
void make_executable () override
 Marks this executable. More...
 
- Public Member Functions inherited from ttg::TTBase
virtual ~TTBase ()=default
 
virtual void invoke ()
 
bool set_trace_instance (bool value)
 
bool tracing () const
 
template<typename T , typename... Ts>
void trace (const T &t, const Ts &...ts)
 Like ttg::trace(), but only produces tracing output if this->tracing()==true More...
 
bool set_lazy_pull_instance (bool value)
 
bool is_lazy_pull ()
 
std::optional< std::reference_wrapper< const TTBase > > ttg () const
 
const TTBasettg_ptr () const
 
bool is_ttg () const
 
void set_name (const std::string &name)
 Sets the name of this operation. More...
 
const std::string & get_name () const
 Gets the name of this operation. More...
 
std::string get_class_name () const
 Gets the demangled class name (uses RTTI) More...
 
const std::vector< TerminalBase * > & get_inputs () const
 Returns the vector of input terminals. More...
 
const std::vector< TerminalBase * > & get_outputs () const
 Returns the vector of output terminals. More...
 
ttg::TerminalBasein (size_t i)
 Returns a pointer to the i'th input terminal. More...
 
ttg::TerminalBaseout (size_t i)
 Returns a pointer to the i'th output terminal. More...
 
template<std::size_t i>
ttg::TerminalBasein ()
 Returns a pointer to the i'th input terminal ... to make API consistent with TT. More...
 
template<std::size_t i>
ttg::TerminalBaseout ()
 Returns a pointer to the i'th output terminal ... to make API consistent with TT. More...
 
auto get_instance_id () const
 
virtual void release ()
 
bool is_executable () const
 

Static Public Attributes

static constexpr int numins = std::tuple_size_v<input_terminalsT>
 
static constexpr int numouts = std::tuple_size_v<output_terminalsT>
 

Additional Inherited Members

- Static Public Member Functions inherited from ttg::TTBase
static bool set_trace_all (bool value)
 
static bool set_lazy_pull (bool value)
 
static const std::vector< TerminalBase * > * get_outputs_tls_ptr ()
 Returns this thread's pointer to the vector of output terminals. More...
 
- Protected Member Functions inherited from ttg::TTBase
void set_input (size_t i, TerminalBase *t)
 
void set_output (size_t i, TerminalBase *t)
 
template<bool out, typename terminalT , std::size_t i, typename setfuncT >
void register_terminal (terminalT &term, const std::string &name, const setfuncT setfunc)
 
template<bool out, std::size_t... IS, typename terminalsT , typename namesT , typename setfuncT >
void register_terminals (std::index_sequence< IS... >, terminalsT &terms, const namesT &names, const setfuncT setfunc)
 
template<typename terminalsT , typename namesT >
void register_input_terminals (terminalsT &terms, const namesT &names)
 
template<typename terminalsT , typename namesT >
void register_output_terminals (terminalsT &terms, const namesT &names)
 
template<std::size_t... IS, typename terminalsT , typename setfuncT >
void set_terminals (std::index_sequence< IS... >, terminalsT &terms, const setfuncT setfunc)
 
template<typename terminalsT , typename setfuncT >
void set_terminals (const terminalsT &terms, const setfuncT setfunc)
 
 TTBase (TTBase &&other)
 
TTBaseoperator= (TTBase &&other)
 
 TTBase (const std::string &name, size_t numins, size_t numouts)
 
void set_outputs_tls_ptr ()
 
void set_outputs_tls_ptr (const std::vector< TerminalBase * > *ptr)
 
- Static Protected Member Functions inherited from ttg::TTBase
static const std::vector< TerminalBase * > *& outputs_tls_ptr_accessor ()
 

Member Typedef Documentation

◆ input_terminals_type

template<typename input_terminalsT , typename output_terminalsT >
using ttg::TTG< input_terminalsT, output_terminalsT >::input_terminals_type = input_terminalsT

Definition at line 36 of file tt.h.

◆ output_terminals_type

template<typename input_terminalsT , typename output_terminalsT >
using ttg::TTG< input_terminalsT, output_terminalsT >::output_terminals_type = output_terminalsT

Definition at line 37 of file tt.h.

Constructor & Destructor Documentation

◆ TTG()

template<typename input_terminalsT , typename output_terminalsT >
template<typename ttseqT >
ttg::TTG< input_terminalsT, output_terminalsT >::TTG ( ttseqT &&  tts,
const input_terminals_type ins,
const output_terminals_type outs,
const std::string &  name = "ttg" 
)
inline
Template Parameters
ttseqTa sequence of std::unique_ptr<TTBase>

Definition at line 69 of file tt.h.

Member Function Documentation

◆ fence()

template<typename input_terminalsT , typename output_terminalsT >
void ttg::TTG< input_terminalsT, output_terminalsT >::fence ( )
inlineoverridevirtual

Waits for the entire TTG that contains this object to be completed (collective); if not contained by a TTG this is a no-op

Implements ttg::TTBase.

Definition at line 100 of file tt.h.

◆ get_op()

template<typename input_terminalsT , typename output_terminalsT >
TTBase* ttg::TTG< input_terminalsT, output_terminalsT >::get_op ( std::size_t  i)
inline

Definition at line 96 of file tt.h.

◆ get_world()

template<typename input_terminalsT , typename output_terminalsT >
ttg::World ttg::TTG< input_terminalsT, output_terminalsT >::get_world ( ) const
inlinefinaloverridevirtual
Returns
World in which this lives

Implements ttg::TTBase.

Definition at line 98 of file tt.h.

◆ in()

template<typename input_terminalsT , typename output_terminalsT >
template<std::size_t i>
auto ttg::TTG< input_terminalsT, output_terminalsT >::in ( )
inline

Return a pointer to i'th input terminal.

Definition at line 86 of file tt.h.

◆ make_executable()

template<typename input_terminalsT , typename output_terminalsT >
void ttg::TTG< input_terminalsT, output_terminalsT >::make_executable ( )
inlineoverridevirtual

Marks this executable.

Implements ttg::TTBase.

Definition at line 102 of file tt.h.

◆ out()

template<typename input_terminalsT , typename output_terminalsT >
template<std::size_t i>
auto ttg::TTG< input_terminalsT, output_terminalsT >::out ( )
inline

Return a pointer to i'th output terminal.

Definition at line 92 of file tt.h.

Member Data Documentation

◆ numins

template<typename input_terminalsT , typename output_terminalsT >
constexpr int ttg::TTG< input_terminalsT, output_terminalsT >::numins = std::tuple_size_v<input_terminalsT>
staticconstexpr

Definition at line 33 of file tt.h.

◆ numouts

template<typename input_terminalsT , typename output_terminalsT >
constexpr int ttg::TTG< input_terminalsT, output_terminalsT >::numouts = std::tuple_size_v<output_terminalsT>
staticconstexpr

Definition at line 34 of file tt.h.


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