ttg::Edge< keyT, valueT > Class Template Reference

Documentation

template<typename keyT, typename valueT>
class ttg::Edge< keyT, valueT >

Edge is used to connect In and Out terminals.

Edge objects can connect in a type-safe way one or more Out terminals to an In terminal or one Out terminal to one or more In terminals.

Template Parameters
<keyT>type of the destination task identifiers (keys)
<valueT>type of the data carried by the Edge.
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 25 of file edge.h.

Public Types

typedef Out< keyT, valueT > output_terminal_type
 
typedef keyT key_type
 
typedef valueT value_type
 

Public Member Functions

 Edge (const std::string name="anonymous edge")
 
 Edge (const std::string name, bool is_pull, ttg::detail::ContainerWrapper< keyT, valueT > c)
 
template<typename... valuesT, typename = std::enable_if_t<(std::is_same_v<valuesT, valueT> && ...)>>
 Edge (const Edge< keyT, valuesT > &...edges)
 Edge carrying a tuple of values. More...
 
Edge< keyT, valueT > edge () const
 
bool live () const
 probes if this is already has at least one input received on the input terminal More...
 
bool is_pull_edge () const
 
void set_in (Out< keyT, valueT > *in) const
 Sets the output terminal that goes into this Edge. More...
 
void set_out (TerminalBase *out) const
 Sets the input terminal that this Edge goes into. More...
 
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t< ttg::meta::is_all_void_v< Key, Value > > fire () const
 

Member Typedef Documentation

◆ key_type

template<typename keyT , typename valueT >
typedef keyT ttg::Edge< keyT, valueT >::key_type

Definition at line 104 of file edge.h.

◆ output_terminal_type

template<typename keyT , typename valueT >
typedef Out<keyT, valueT> ttg::Edge< keyT, valueT >::output_terminal_type

Definition at line 103 of file edge.h.

◆ value_type

template<typename keyT , typename valueT >
typedef valueT ttg::Edge< keyT, valueT >::value_type

Definition at line 105 of file edge.h.

Constructor & Destructor Documentation

◆ Edge() [1/3]

template<typename keyT , typename valueT >
ttg::Edge< keyT, valueT >::Edge ( const std::string  name = "anonymous edge")
inline

Definition at line 110 of file edge.h.

◆ Edge() [2/3]

template<typename keyT , typename valueT >
ttg::Edge< keyT, valueT >::Edge ( const std::string  name,
bool  is_pull,
ttg::detail::ContainerWrapper< keyT, valueT >  c 
)
inline

Definition at line 112 of file edge.h.

◆ Edge() [3/3]

template<typename keyT , typename valueT >
template<typename... valuesT, typename = std::enable_if_t<(std::is_same_v<valuesT, valueT> && ...)>>
ttg::Edge< keyT, valueT >::Edge ( const Edge< keyT, valuesT > &...  edges)
inline

Edge carrying a tuple of values.

Definition at line 118 of file edge.h.

Member Function Documentation

◆ edge()

template<typename keyT , typename valueT >
Edge<keyT, valueT> ttg::Edge< keyT, valueT >::edge ( ) const
inline

returns a reference to itself this is used by edge wrappers to return the underlying edge

Definition at line 131 of file edge.h.

◆ fire()

template<typename keyT , typename valueT >
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<ttg::meta::is_all_void_v<Key, Value> > ttg::Edge< keyT, valueT >::fire ( ) const
inline

Triggers the input terminal the Edge is connected to

Note
Only valid for pure control Edges that connect to tasks without identifiers and do not carry data

Definition at line 157 of file edge.h.

◆ is_pull_edge()

template<typename keyT , typename valueT >
bool ttg::Edge< keyT, valueT >::is_pull_edge ( ) const
inline

Definition at line 142 of file edge.h.

◆ live()

template<typename keyT , typename valueT >
bool ttg::Edge< keyT, valueT >::live ( ) const
inline

probes if this is already has at least one input received on the input terminal

Definition at line 134 of file edge.h.

◆ set_in()

template<typename keyT , typename valueT >
void ttg::Edge< keyT, valueT >::set_in ( Out< keyT, valueT > *  in) const
inline

Sets the output terminal that goes into this Edge.

Definition at line 145 of file edge.h.

◆ set_out()

template<typename keyT , typename valueT >
void ttg::Edge< keyT, valueT >::set_out ( TerminalBase out) const
inline

Sets the input terminal that this Edge goes into.

Definition at line 150 of file edge.h.


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