Inheritance diagram for ttg::In< keyT, valueT >:
ttg::InTerminalBase< void > ttg::TerminalBase

Documentation

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

An input terminal for receiving 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); a const valueT indicates that the incoming data is passed by const reference

Definition at line 143 of file terminal.h.

Public Types

using base_type = InTerminalBase< keyT >
 
typedef valueT value_type
 
typedef keyT key_type
 
using edge_type = Edge< keyT, valueT >
 
using send_callback_type = meta::detail::send_callback_t< keyT, std::decay_t< valueT > >
 
using move_callback_type = meta::detail::move_callback_t< keyT, std::decay_t< valueT > >
 
using broadcast_callback_type = meta::detail::broadcast_callback_t< keyT, std::decay_t< valueT > >
 
using setsize_callback_type = typename base_type::setsize_callback_type
 
using finalize_callback_type = typename base_type::finalize_callback_type
 
using prepare_send_callback_type = meta::detail::prepare_send_callback_t< keyT, std::decay_t< valueT > >
 
- Public Types inherited from ttg::InTerminalBase< void >
typedef void key_type
 
using setsize_callback_type = meta::detail::setsize_callback_t< void >
 
using finalize_callback_type = meta::detail::finalize_callback_t< void >
 
- Public Types inherited from ttg::TerminalBase
enum class  Type { Write , Read , Consume }
 describes the terminal type More...
 

Public Member Functions

 In ()
 Default constructor of an Input Terminal. More...
 
void set_callback (const send_callback_type &send_callback, const move_callback_type &move_callback, const broadcast_callback_type &bcast_callback=broadcast_callback_type{}, const setsize_callback_type &setsize_callback=setsize_callback_type{}, const finalize_callback_type &finalize_callback=finalize_callback_type{}, const prepare_send_callback_type &prepare_send_callback=prepare_send_callback_type{})
 
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 Key = keyT>
std::enable_if_t<!meta::is_void_v< Key >, void > sendk (const Key &key)
 
template<typename Value = valueT>
std::enable_if_t<!meta::is_void_v< Value >, void > sendv (Value &&value)
 
void send ()
 
template<typename rangeT , typename Value >
std::enable_if_t<!meta::is_void_v< Value >, void > broadcast (const rangeT &keylist, const Value &value)
 
template<typename rangeT , typename Value >
std::enable_if_t<!meta::is_void_v< Value >, void > broadcast (const rangeT &keylist, Value &&value)
 
template<typename rangeT , typename Value = valueT>
std::enable_if_t< meta::is_void_v< Value >, void > broadcast (const rangeT &keylist)
 
template<typename rangeT , typename Value >
void prepare_send (const rangeT &keylist, Value &&value)
 
template<typename Value >
void prepare_send (Value &&value)
 
- Public Member Functions inherited from ttg::InTerminalBase< void >
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
 

Public Attributes

ttg::detail::ContainerWrapper< keyT, valueT > container
 
- Public Attributes inherited from ttg::TerminalBase
bool is_pull_terminal = false
 

Static Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from ttg::InTerminalBase< void >
 InTerminalBase (TerminalBase::Type t)
 
void set_callback (const setsize_callback_type &setsize_callback=setsize_callback_type{}, const finalize_callback_type &finalize_callback=finalize_callback_type{})
 
- 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)
 
- Protected Attributes inherited from ttg::InTerminalBase< void >
setsize_callback_type setsize_callback
 
finalize_callback_type finalize_callback
 

Member Typedef Documentation

◆ base_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::base_type = InTerminalBase<keyT>

Definition at line 145 of file terminal.h.

◆ broadcast_callback_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::broadcast_callback_type = meta::detail::broadcast_callback_t<keyT, std::decay_t<valueT> >

Definition at line 155 of file terminal.h.

◆ edge_type

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

Definition at line 152 of file terminal.h.

◆ finalize_callback_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::finalize_callback_type = typename base_type::finalize_callback_type

Definition at line 157 of file terminal.h.

◆ key_type

template<typename keyT = void, typename valueT = void>
typedef keyT ttg::In< keyT, valueT >::key_type

Definition at line 147 of file terminal.h.

◆ move_callback_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::move_callback_type = meta::detail::move_callback_t<keyT, std::decay_t<valueT> >

Definition at line 154 of file terminal.h.

◆ prepare_send_callback_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::prepare_send_callback_type = meta::detail::prepare_send_callback_t<keyT, std::decay_t<valueT> >

Definition at line 158 of file terminal.h.

◆ send_callback_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::send_callback_type = meta::detail::send_callback_t<keyT, std::decay_t<valueT> >

Definition at line 153 of file terminal.h.

◆ setsize_callback_type

template<typename keyT = void, typename valueT = void>
using ttg::In< keyT, valueT >::setsize_callback_type = typename base_type::setsize_callback_type

Definition at line 156 of file terminal.h.

◆ value_type

template<typename keyT = void, typename valueT = void>
typedef valueT ttg::In< keyT, valueT >::value_type

Definition at line 146 of file terminal.h.

Constructor & Destructor Documentation

◆ In()

template<typename keyT = void, typename valueT = void>
ttg::In< keyT, valueT >::In ( )
inline

Default constructor of an Input Terminal.

Definition at line 180 of file terminal.h.

Member Function Documentation

◆ broadcast() [1/3]

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

Definition at line 298 of file terminal.h.

◆ broadcast() [2/3]

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

Definition at line 257 of file terminal.h.

◆ broadcast() [3/3]

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

Definition at line 277 of file terminal.h.

◆ prepare_send() [1/2]

template<typename keyT = void, typename valueT = void>
template<typename rangeT , typename Value >
void ttg::In< keyT, valueT >::prepare_send ( const rangeT &  keylist,
Value &&  value 
)
inline

Definition at line 319 of file terminal.h.

◆ prepare_send() [2/2]

template<typename keyT = void, typename valueT = void>
template<typename Value >
void ttg::In< keyT, valueT >::prepare_send ( Value &&  value)
inline

Definition at line 334 of file terminal.h.

◆ send() [1/2]

template<typename keyT = void, typename valueT = void>
void ttg::In< keyT, valueT >::send ( )
inline

Definition at line 246 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::In< keyT, valueT >::send ( const Key &  key,
Value &&  value 
)
inline

Definition at line 206 of file terminal.h.

◆ sendk()

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

Definition at line 221 of file terminal.h.

◆ sendv()

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

Definition at line 230 of file terminal.h.

◆ set_callback()

template<typename keyT = void, typename valueT = void>
void ttg::In< keyT, valueT >::set_callback ( const send_callback_type send_callback,
const move_callback_type move_callback,
const broadcast_callback_type bcast_callback = broadcast_callback_type{},
const setsize_callback_type setsize_callback = setsize_callback_type{},
const finalize_callback_type finalize_callback = finalize_callback_type{},
const prepare_send_callback_type prepare_send_callback = prepare_send_callback_type{} 
)
inline

Define the callbacks used by the backend task system to implement data movement when a data is set in this Input Terminal

Parameters
[in]send_callbackwhen an object must be copied inside this terminal
[in]move_callbackwhen a rvalue reference is std::move onto this terminal
[in]bcast_callbackwhen this terminal receives a list of task identifiers to broadcast a data to
[in]finalize_callbackif the terminal is a reduce terminal, denotes that no other local thread will continue adding data onto this terminal
[in]setsize_callbackif the terminal is a reduce terminal, announces how many items will be set unto this terminal for reduction
[in]prepare_send_callbackfor resumable/device tasks this is called before actual send

Definition at line 192 of file terminal.h.

Member Data Documentation

◆ container

template<typename keyT = void, typename valueT = void>
ttg::detail::ContainerWrapper<keyT, valueT> ttg::In< keyT, valueT >::container

Definition at line 160 of file terminal.h.

◆ is_an_input_terminal

template<typename keyT = void, typename valueT = void>
constexpr bool ttg::In< keyT, valueT >::is_an_input_terminal = true
staticconstexpr

Definition at line 159 of file terminal.h.


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