ttg::Out< keyT, valueT > Class Template Reference
Inheritance diagram for ttg::Out< keyT, valueT >:
ttg::OutTerminalBase< void > ttg::TerminalBase

Documentation

template<typename keyT = void, typename valueT = void>
class ttg::Out< keyT, valueT >

An output terminal for sending messages annotated by task IDs of type KeyT and values of type valueT

Template Parameters
<keyT>a task ID type (can be void)
<valueT>a data type (can be void)
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 429 of file terminal.h.

Public Types

using value_type = valueT
 
using key_type = typename OutTerminalBase< keyT >::key_type
 
using edge_type = Edge< keyT, valueT >
 
- Public Types inherited from ttg::OutTerminalBase< void >
using key_type = void
 
- Public Types inherited from ttg::TerminalBase
enum class  Type { Write , Read , Consume }
 describes the terminal type More...
 

Public Member Functions

 Out ()=default
 
void connect (TerminalBase *in) override
 
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<!meta::is_void_v< Key > &&meta::is_void_v< Value >, void > sendk (const Key &key)
 
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t< meta::is_void_v< Key > &&!meta::is_void_v< Value >, void > sendv (Value &&value)
 
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t< meta::is_all_void_v< Key, Value >, void > send ()
 
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t< meta::is_none_void_v< Key, Value >, void > send (const Key &key, Value &&value)
 
template<typename rangeT , typename Key = keyT, typename Value = valueT>
std::enable_if_t< meta::is_none_void_v< Key, Value >, void > broadcast (const rangeT &keylist, const Value &value)
 
template<typename rangeT , typename Key = keyT>
std::enable_if_t< meta::is_none_void_v< Key > &&meta::is_void_v< valueT >, void > broadcast (const rangeT &keylist)
 
template<typename rangeT , typename Key = keyT, typename Value = valueT>
std::enable_if_t< meta::is_none_void_v< Key > &&!meta::is_void_v< valueT >, void > prepare_send (const rangeT &keylist, const Value &value)
 
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t< meta::is_void_v< Key > &&!meta::is_void_v< valueT >, void > prepare_send (const Value &value)
 
- Public Member Functions inherited from ttg::OutTerminalBase< void >
 OutTerminalBase ()
 
auto nsuccessors () const
 
const auto & successors () const
 
std::enable_if_t<!meta::is_void_v< Key >, void > set_size (const Key &key, std::size_t size)
 
std::enable_if_t< meta::is_void_v< Key >, void > set_size (std::size_t size)
 
std::enable_if_t<!meta::is_void_v< Key >, void > finalize (const Key &key)
 
std::enable_if_t< meta::is_void_v< Key >, void > finalize ()
 
- Public Member Functions inherited from ttg::TerminalBase
TTBaseget_tt () const
 Return ptr to containing tt. More...
 
size_t get_index () const
 Returns index of terminal. More...
 
const std::string & get_name () const
 Returns name of terminal. More...
 
const std::string & get_key_type_str () const
 Returns string representation of key type. More...
 
const std::string & get_value_type_str () const
 Returns string representation of value type. More...
 
Type get_type () const
 Returns the terminal type. More...
 
const std::vector< TerminalBase * > & get_connections () const
 Get connections to successors. More...
 
const std::vector< TerminalBase * > & get_predecessors () const
 
void connect_pull_nopred (TerminalBase *p)
 
bool is_connected () const
 Returns true if this terminal (input or output) is connected. More...
 
virtual ~TerminalBase ()=default
 

Static Public Attributes

static constexpr bool is_an_output_terminal = true
 
- Static Public Attributes inherited from ttg::OutTerminalBase< void >
static constexpr bool is_an_output_terminal
 
- Static Public Attributes inherited from ttg::TerminalBase
static constexpr bool is_a_terminal = true
 

Additional Inherited Members

- Public Attributes inherited from ttg::TerminalBase
bool is_pull_terminal = false
 
- Protected Member Functions inherited from ttg::TerminalBase
 TerminalBase (Type type)
 
void set (TTBase *tt, size_t index, const std::string &name, const std::string &key_type_str, const std::string &value_type_str, Type type)
 
void connect_base (TerminalBase *successor)
 
void connect_pull (TerminalBase *predecessor)
 

Member Typedef Documentation

◆ edge_type

template<typename keyT = void, typename valueT = void>
using ttg::Out< keyT, valueT >::edge_type = Edge<keyT, valueT>

Definition at line 435 of file terminal.h.

◆ key_type

template<typename keyT = void, typename valueT = void>
using ttg::Out< keyT, valueT >::key_type = typename OutTerminalBase<keyT>::key_type

Definition at line 432 of file terminal.h.

◆ value_type

template<typename keyT = void, typename valueT = void>
using ttg::Out< keyT, valueT >::value_type = valueT

Definition at line 431 of file terminal.h.

Constructor & Destructor Documentation

◆ Out()

template<typename keyT = void, typename valueT = void>
ttg::Out< keyT, valueT >::Out ( )
default

Member Function Documentation

◆ broadcast() [1/2]

template<typename keyT = void, typename valueT = void>
template<typename rangeT , typename Key = keyT>
std::enable_if_t<meta::is_none_void_v<Key> && meta::is_void_v<valueT>, void> ttg::Out< keyT, valueT >::broadcast ( const rangeT &  keylist)
inline

Definition at line 574 of file terminal.h.

◆ broadcast() [2/2]

template<typename keyT = void, typename valueT = void>
template<typename rangeT , typename Key = keyT, typename Value = valueT>
std::enable_if_t<meta::is_none_void_v<Key, Value>, void> ttg::Out< keyT, valueT >::broadcast ( const rangeT &  keylist,
const Value &  value 
)
inline

Definition at line 561 of file terminal.h.

◆ connect()

template<typename keyT = void, typename valueT = void>
void ttg::Out< keyT, valueT >::connect ( TerminalBase in)
inlineoverridevirtual
Note
will check data types unless macro NDEBUG is defined

Implements ttg::TerminalBase.

Definition at line 449 of file terminal.h.

◆ prepare_send() [1/2]

template<typename keyT = void, typename valueT = void>
template<typename rangeT , typename Key = keyT, typename Value = valueT>
std::enable_if_t<meta::is_none_void_v<Key> && !meta::is_void_v<valueT>, void> ttg::Out< keyT, valueT >::prepare_send ( const rangeT &  keylist,
const Value &  value 
)
inline

Definition at line 587 of file terminal.h.

◆ prepare_send() [2/2]

template<typename keyT = void, typename valueT = void>
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<meta::is_void_v<Key> && !meta::is_void_v<valueT>, void> ttg::Out< keyT, valueT >::prepare_send ( const Value &  value)
inline

Definition at line 600 of file terminal.h.

◆ send() [1/2]

template<typename keyT = void, typename valueT = void>
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<meta::is_all_void_v<Key, Value>, void> ttg::Out< keyT, valueT >::send ( )
inline

Definition at line 514 of file terminal.h.

◆ send() [2/2]

template<typename keyT = void, typename valueT = void>
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<meta::is_none_void_v<Key, Value>, void> ttg::Out< keyT, valueT >::send ( const Key &  key,
Value &&  value 
)
inline

Definition at line 532 of file terminal.h.

◆ sendk()

template<typename keyT = void, typename valueT = void>
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<!meta::is_void_v<Key> && meta::is_void_v<Value>, void> ttg::Out< keyT, valueT >::sendk ( const Key &  key)
inline

Definition at line 475 of file terminal.h.

◆ sendv()

template<typename keyT = void, typename valueT = void>
template<typename Key = keyT, typename Value = valueT>
std::enable_if_t<meta::is_void_v<Key> && !meta::is_void_v<Value>, void> ttg::Out< keyT, valueT >::sendv ( Value &&  value)
inline

Definition at line 487 of file terminal.h.

Member Data Documentation

◆ is_an_output_terminal

template<typename keyT = void, typename valueT = void>
constexpr bool ttg::Out< keyT, valueT >::is_an_output_terminal = true
staticconstexpr

Definition at line 436 of file terminal.h.


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