ttg Namespace Reference

top-level TTG namespace contains runtime-neutral functionality More...

Namespaces

 base
 
 detail
 
 device
 
 iostream
 
 meta
 
 overload
 place for overloading/instantiating hash and other functionality
 

Classes

class  TerminalBase
 
class  TTBase
 A base class for all template tasks. More...
 
class  BinaryTreeBroadcast
 generic binary broadcast of a value to a set of {key,value} pairs More...
 
struct  ConstraintBase
 
struct  SequencedKeysConstraint
 
struct  resumable_task_events
 
struct  event
 represents a generic one-time event More...
 
struct  resumable_task
 task that can be resumed after some events occur More...
 
struct  resumable_task_state
 
class  Edge
 Edge is used to connect In and Out terminals. More...
 
struct  terminals_to_edges
 
struct  terminals_to_edges< std::tuple< termsT... > >
 
struct  edges_to_output_terminals
 
struct  edges_to_output_terminals< std::tuple< edgesT... > >
 
class  TTG
 a template task graph implementation More...
 
class  BinaryTreeReduce
 generic binary reduction of a set of key-value pairs. More...
 
struct  runtime_traits
 
struct  runtime_traits< Runtime::PaRSEC >
 
struct  runtime_traits< Runtime::MADWorld >
 
struct  default_data_descriptor
 Provides (de)serialization of C++ data that can be invoked from C via ttg_data_descriptor. More...
 
struct  default_data_descriptor< T, std::enable_if_t< detail::is_memcpyable_v< T > &&!detail::is_user_buffer_serializable_v< T > &&!ttg::has_split_metadata< T >::value > >
 default_data_descriptor for trivially-copyable types More...
 
struct  default_data_descriptor< T, std::enable_if_t< ttg::has_split_metadata< T >::value > >
 default_data_descriptor for types that support 2-stage serialization (metadata first, then the rest) for implementing zero-copy transfers More...
 
struct  SplitMetadataDescriptor
 
struct  has_split_metadata
 
struct  has_split_metadata< T, ttg::meta::void_t< decltype(std::declval< SplitMetadataDescriptor< T >>().get_metadata(std::declval< T >()))> >
 
class  InTerminalBase
 Base type for input terminals receiving messages annotated by task IDs of type keyT More...
 
class  In
 
class  OutTerminalBase
 
class  Out
 
class  Traverse
 Traverses a graph of ops in depth-first manner following out edges. More...
 
class  SinkTT
 A data sink for one input. More...
 
class  Debugger
 
class  Dot
 Prints the graph to a std::string in the format understood by GraphViz's dot program. More...
 
struct  iovec
 
struct  MultiIndex
 
class  BinarySpanningTree
 a binary spanning tree of integers in the [0,size) interval More...
 
class  Void
 A complete version of void. More...
 
class  World
 

Typedefs

template<typename T , typename Allocator = std::allocator<std::decay_t<T>>>
using Buffer = TTG_IMPL_NS::Buffer< T, Allocator >
 
using suspend_always = TTG_CXX_COROUTINE_NAMESPACE::suspend_always
 
using suspend_never = TTG_CXX_COROUTINE_NAMESPACE::suspend_never
 
template<typename Promise >
using coroutine_handle = TTG_CXX_COROUTINE_NAMESPACE::coroutine_handle< Promise >
 
template<typename T >
using devicescratch = TTG_IMPL_NS::devicescratch< T >
 
using OpBase = TTBase
 
using TemplateTaskBase = TTBase
 
template<typename input_terminalsT , typename output_terminalsT >
using TemplateTaskGraph = TTG< input_terminalsT, output_terminalsT >
 
template<typename input_terminalsT , typename output_terminalsT >
using CompositeOp = TTG< input_terminalsT, output_terminalsT >
 
template<typename T >
using Ptr = TTG_IMPL_NS::Ptr< T >
 
template<typename T >
using TTValue = TTG_IMPL_NS::TTValue< T >
 
template<typename... Ts>
using typelist = meta::typelist< Ts... >
 

Enumerations

enum class  TaskCoroutineID { Invalid , ResumableTask , DeviceTask }
 
enum class  scope { Allocate = 0x0 , SyncIn = 0x2 }
 
enum class  Execution { Inline , Async }
 denotes task execution policy More...
 
enum class  ExecutionSpace {
  Host , CUDA , HIP , L0 ,
  Invalid
}
 denotes task execution space More...
 
enum class  Runtime { PaRSEC , MADWorld }
 

Functions

template<typename Mapper , typename = std::enable_if_t<std::is_invocable_v<Mapper, std::decay_t<std::tuple_element_t<0, boost::callable_traits::args_t<Mapper>>>>>>
 SequencedKeysConstraint (Mapper &&) -> SequencedKeysConstraint< std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>, std::decay_t< boost::callable_traits::return_type_t< Mapper >>, std::less< std::decay_t< boost::callable_traits::return_type_t< Mapper >>>, std::enable_if_t< std::is_invocable_v< Mapper, std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>>, Mapper > >
 
template<typename Mapper , typename = std::enable_if_t<std::is_invocable_v<Mapper, std::decay_t<std::tuple_element_t<0, boost::callable_traits::args_t<Mapper>>>>>>
 SequencedKeysConstraint (Mapper &&, bool) -> SequencedKeysConstraint< std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>, std::decay_t< boost::callable_traits::return_type_t< Mapper >>, std::less< std::decay_t< boost::callable_traits::return_type_t< Mapper >>>, std::enable_if_t< std::is_invocable_v< Mapper, std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>>, Mapper > >
 
template<typename Key , typename Ordinal , typename Compare , typename Mapper >
 SequencedKeysConstraint (SequencedKeysConstraint< Key, Ordinal, Compare, Mapper > &&) -> SequencedKeysConstraint< Key, Ordinal, Compare, Mapper >
 
template<typename Key , typename Ordinal , typename Compare , typename Mapper >
 SequencedKeysConstraint (const SequencedKeysConstraint< Key, Ordinal, Compare, Mapper > &) -> SequencedKeysConstraint< Key, Ordinal, Compare, Mapper >
 
template<template< typename... > typename Constraint, typename... Args>
auto make_shared_constraint (Args &&... args)
 
template<typename... Events>
 resumable_task_events (Events &&...) -> resumable_task_events< sizeof...(Events)>
 
template<typename T >
auto make_scratch (T *val, ttg::scope scope, std::size_t count=1)
 
template<typename... TTBasePtrs>
std::enable_if_t<(std::is_convertible_v< decltype(*(std::declval< TTBasePtrs >))), TTBase & > bool make_graph_executable (TTBasePtrs &&...tts)
 
template<typename keyT , typename valueT >
void connect (ttg::Out< keyT, valueT > *out, ttg::In< keyT, valueT > *in)
 Connect output terminal to successor input terminal. More...
 
void connect (ttg::TerminalBase *out, ttg::TerminalBase *in)
 Connect output terminal to successor input terminal. More...
 
template<std::size_t outindex, std::size_t inindex, typename producer_tt_ptr , typename successor_tt_ptr >
void connect (producer_tt_ptr &p, successor_tt_ptr &c)
 Connect producer output terminal outindex to consumer input terminal inindex (via unique or otherwise wrapped pointers to TTs) More...
 
template<std::size_t outindex, std::size_t inindex, typename producer_tt_ptr , typename successor_tt_ptr >
void connect (producer_tt_ptr *p, successor_tt_ptr *c)
 Connect producer output terminal outindex to consumer input terminal inindex (via bare pointers to TTs) More...
 
void connect (size_t outindex, size_t inindex, TTBase *producer, TTBase *consumer)
 Connect producer output terminal outindex to consumer input terminal inindex (via TTBase pointers) More...
 
template<typename keyT , typename... valuesT>
auto fuse (const Edge< keyT, valuesT > &...args)
 Fuse edges into one This allows receiving one data from either of the combined edges. More...
 
template<typename... inedgesT>
auto edges (inedgesT &&...args)
 Make a tuple of Edges to pass to. More...
 
template<typename keyT , typename valueT , typename output_terminalT , ttg::Runtime Runtime = ttg::ttg_runtime>
void send (const keyT &key, valueT &&value, ttg::Out< keyT, valueT > &t)
 Sends a task id and a value to the given output terminal. More...
 
template<typename keyT >
void sendk (const keyT &key, ttg::Out< keyT, void > &t)
 Sends a task id (without an accompanying value) to the given output terminal. More...
 
template<typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void sendv (valueT &&value, ttg::Out< void, valueT > &t)
 Sends a value (without an accompanying task id) to the given output terminal. More...
 
void send (ttg::Out< void, void > &t)
 Sends a control message (message without an accompanying task id or a value) to the given output terminal. More...
 
template<size_t i, typename keyT , typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t< meta::is_none_void_v< keyT, std::decay_t< valueT > >, void > send (const keyT &key, valueT &&value, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Sends a task id and a value to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t. More...
 
template<typename keyT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t< meta::is_none_void_v< keyT, std::decay_t< valueT > >, void > send (size_t i, const keyT &key, valueT &&value)
 Sends a task id and a value to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename keyT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t< meta::is_none_void_v< keyT, std::decay_t< valueT > >, void > send (const keyT &key, valueT &&value)
 Sends a task id and a value to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename keyT , typename... out_keysT, typename... out_valuesT>
std::enable_if_t<!meta::is_void_v< keyT >, void > sendk (const keyT &key, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Sends a task id (without an accompanying value) to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t. More...
 
template<typename keyT >
std::enable_if_t<!meta::is_void_v< keyT >, void > sendk (std::size_t i, const keyT &key)
 Sends a task id (without an accompanying value) to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename keyT >
std::enable_if_t<!meta::is_void_v< keyT >, void > sendk (const keyT &key)
 Sends a task id (without an accompanying value) to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<!meta::is_void_v< std::decay_t< valueT > >, void > sendv (valueT &&value, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Sends a value (without an accompanying task id) to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t. More...
 
template<typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<!meta::is_void_v< std::decay_t< valueT > >, void > sendv (std::size_t i, valueT &&value)
 Sends a value (without an accompanying task id) to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<!meta::is_void_v< std::decay_t< valueT > >, void > sendv (valueT &&value)
 Sends a value (without an accompanying task id) to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename... out_keysT, typename... out_valuesT>
void send (std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Sends a control message (message without an accompanying task id or a value) to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t. More...
 
void send (std::size_t i)
 Sends a control message (message without an accompanying task id or a value) to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i>
void send ()
 Sends a control message (message without an accompanying task id or a value) to the template tasks attached to the output terminal of this template task. More...
 
template<size_t i, typename rangeT , typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcast (const rangeT &keylist, valueT &&value, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 
template<typename rangeT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcast (std::size_t i, const rangeT &keylist, valueT &&value)
 
template<size_t i, typename rangeT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcast (const rangeT &keylist, valueT &&value)
 
template<size_t i, size_t... I, typename... RangesT, typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcast (const std::tuple< RangesT... > &keylists, valueT &&value, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 
template<size_t i, size_t... I, typename... RangesT, typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcast (const std::tuple< RangesT... > &keylists, valueT &&value)
 
template<size_t i, typename rangeT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcastk (const rangeT &keylist, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 
template<typename rangeT , ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcastk (std::size_t i, const rangeT &keylist)
 
template<size_t i, typename rangeT , ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcastk (const rangeT &keylist)
 
template<size_t i, size_t... I, typename... RangesT, typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcastk (const std::tuple< RangesT... > &keylists, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 
template<size_t i, size_t... I, typename... RangesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void broadcastk (const std::tuple< RangesT... > &keylists)
 
template<typename keyT , typename out_valueT >
std::enable_if_t<!meta::is_void_v< keyT >, void > set_size (const keyT &key, const std::size_t size, ttg::Out< keyT, out_valueT > &t)
 
template<size_t i, typename keyT , typename... out_keysT, typename... out_valuesT>
std::enable_if_t<!meta::is_void_v< keyT >, void > set_size (const keyT &key, const std::size_t size, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Set the size of all streaming input terminals connected to the output terminal for a task identified by key. More...
 
template<typename keyT >
std::enable_if_t<!meta::is_void_v< keyT >, void > set_size (std::size_t i, const keyT &key, const std::size_t size)
 
template<size_t i, typename keyT >
std::enable_if_t<!meta::is_void_v< keyT >, void > set_size (const keyT &key, const std::size_t size)
 
template<typename out_keyT , typename out_valueT >
void set_size (const std::size_t size, ttg::Out< out_keyT, out_valueT > &t)
 Set the size of all streaming input terminals connected to an output terminal with void key. More...
 
template<size_t i, typename... out_keysT, typename... out_valuesT>
void set_size (const std::size_t size, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Set the size of all streaming input terminals connected to an output terminal for a task, with void key. More...
 
void set_size (std::size_t i, const std::size_t size)
 
template<std::size_t i>
void set_size (const std::size_t size)
 
template<typename keyT , typename out_keyT , typename out_valueT >
std::enable_if_t<!meta::is_void_v< keyT >, void > finalize (const keyT &key, ttg::Out< out_keyT, out_valueT > &t)
 Finalize streaming input terminals connecting to the given output terminal for tasks identified by key. More...
 
template<size_t i, typename keyT , typename... out_keysT, typename... out_valuesT>
std::enable_if_t<!meta::is_void_v< keyT >, void > finalize (const keyT &key, std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Finalize streaming input terminals connected to the given output terminal; use this to finalize terminals with non-void key. More...
 
template<typename keyT >
std::enable_if_t<!meta::is_void_v< keyT >, void > finalize (std::size_t i, const keyT &key)
 
template<std::size_t i, typename keyT >
std::enable_if_t<!meta::is_void_v< keyT >, void > finalize (const keyT &key)
 
template<typename out_keyT , typename out_valueT >
void finalize (ttg::Out< out_keyT, out_valueT > &t)
 Finalize streaming input terminals connected to the given output terminal; use this to finalize terminals with void key. More...
 
template<size_t i, typename... out_keysT, typename... out_valuesT>
void finalize (std::tuple< ttg::Out< out_keysT, out_valuesT >... > &t)
 Finalize streaming input terminals connected to the ith output terminal in the tuple; use this to finalize terminals with void key. More...
 
void finalize (std::size_t i)
 
template<std::size_t i>
void finalize ()
 Finalizes the TTG runtime. More...
 
template<typename... RestOfArgs>
void initialize (int argc, char **argv, int num_threads=-1, RestOfArgs &&...)
 
void abort ()
 Aborts the TTG program using the default backend's ttg_abort method. More...
 
World default_execution_context ()
 Accesses the default backend's default execution context. More...
 
void execute (World world=default_execution_context())
 Starts the execution in the given execution context. More...
 
void fence (World world=default_execution_context())
 Returns when all tasks associated with the given execution context have finished on all ranks. More...
 
template<typename T , typename... Args>
Ptr< T > make_ptr (Args &&... args)
 
template<typename T >
Ptr< std::decay_t< T > > get_ptr (T &&obj)
 
template<typename... RestOfArgs>
void initialize (int argc, char **argv, int num_threads, RestOfArgs &&... args)
 Initializes the TTG runtime with the default backend. More...
 
int rank (World world=default_execution_context())
 
int size (World world=default_execution_context())
 
template<typename TT >
void invoke_once (TT &tt)
 
template<typename TT , typename Key >
void invoke_once (TT &&tt, Key &&key)
 
template<typename T >
const ttg_data_descriptorget_data_descriptor ()
 
template<typename TTVisitor = decltype(trivial_1param_lambda)&, typename InVisitor = decltype(trivial_1param_lambda)&, typename OutVisitor = decltype(trivial_1param_lambda)&>
auto make_traverse (TTVisitor &&tt_v=trivial_1param_lambda, InVisitor &&in_v=trivial_1param_lambda, OutVisitor &&out_v=trivial_1param_lambda)
 
template<typename ttseqT , typename input_terminalsT , typename output_terminalsT >
auto make_ttg (ttseqT &&tts, const input_terminalsT &ins, const output_terminalsT &outs, const std::string &name="ttg")
 
void initialize_fpe ()
 Initializes the floating point exceptions. More...
 
void launch_debugger (int rank, const char *exec_name, const char *cmd)
 
void launch_lldb (int rank, const char *exec_name)
 
void launch_gdb (int rank, const char *exec_name)
 
bool diagnose ()
 
void diagnose_on ()
 
void diagnose_off ()
 
template<typename T >
bool has_value (std::future< T > const &f)
 
template<typename T >
bool has_value (std::shared_future< T > const &f)
 
template<class T >
void hash_combine (std::size_t &seed, T const &v)
 
template<std::size_t Rank>
std::ostream & operator<< (std::ostream &os, const MultiIndex< Rank > &key)
 
template<typename T , typename... Ts>
void print (const T &t, const Ts &... ts)
 atomically prints to std::cout a sequence of items (separated by ttg::print_separator) followed by std::endl More...
 
template<typename T , typename... Ts>
void print_error (const T &t, const Ts &... ts)
 atomically prints to std::cerr a sequence of items (separated by ttg::print_separator) followed by std::endl More...
 
template<typename T , typename... Ts>
void log (const T &t, const Ts &... ts)
 atomically prints to std::clog a sequence of items (separated by ttg::print_separator) followed by std::endl More...
 
constexpr bool trace_enabled ()
 returns whether tracing was enabled at configure time More...
 
bool tracing ()
 returns whether tracing is enabled More...
 
void trace_on ()
 enables tracing; if trace_enabled()==true this has no effect More...
 
void trace_off ()
 disables tracing; if trace_enabled()==true this has no effect More...
 
template<typename T , typename... Ts>
void trace (const T &t, const Ts &... ts)
 
std::array< int, 3 > version ()
 
const char * git_revision () noexcept
 
const char * git_description () noexcept
 
bool operator== (const Void &, const Void &)
 
bool operator!= (const Void &, const Void &)
 
std::ostream & operator<< (std::ostream &os, const ttg::Void &)
 
ttg::Worldget_default_world ()
 

Variables

constexpr const ttg::Runtime ttg_runtime = ttg::Runtime::MADWorld
 
constexpr char print_separator = ' '
 
constexpr char print_seq_separator = ','
 
constexpr char print_seq_begin = '{'
 
constexpr char print_seq_end = '}'
 

Typedef Documentation

◆ Buffer

template<typename T , typename Allocator = std::allocator<std::decay_t<T>>>
using ttg::Buffer = typedef TTG_IMPL_NS::Buffer<T, Allocator>

Definition at line 11 of file buffer.h.

◆ CompositeOp

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

Definition at line 43 of file fwd.h.

◆ coroutine_handle

template<typename Promise >
using ttg::coroutine_handle = typedef TTG_CXX_COROUTINE_NAMESPACE::coroutine_handle<Promise>

Definition at line 24 of file coroutine.h.

◆ devicescratch

template<typename T >
using ttg::devicescratch = typedef TTG_IMPL_NS::devicescratch<T>

Definition at line 10 of file devicescratch.h.

◆ OpBase

using ttg::OpBase = typedef TTBase

Definition at line 27 of file fwd.h.

◆ Ptr

template<typename T >
using ttg::Ptr = typedef TTG_IMPL_NS::Ptr<T>

Definition at line 9 of file ptr.h.

◆ suspend_always

using ttg::suspend_always = typedef TTG_CXX_COROUTINE_NAMESPACE::suspend_always

Definition at line 21 of file coroutine.h.

◆ suspend_never

using ttg::suspend_never = typedef TTG_CXX_COROUTINE_NAMESPACE::suspend_never

Definition at line 22 of file coroutine.h.

◆ TemplateTaskBase

using ttg::TemplateTaskBase = typedef TTBase

Definition at line 29 of file fwd.h.

◆ TemplateTaskGraph

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

Definition at line 39 of file fwd.h.

◆ TTValue

template<typename T >
using ttg::TTValue = typedef TTG_IMPL_NS::TTValue<T>

Definition at line 9 of file ttvalue.h.

◆ typelist

template<typename... Ts>
using ttg::typelist = typedef meta::typelist<Ts...>

Definition at line 81 of file typelist.h.

Enumeration Type Documentation

◆ Execution

enum ttg::Execution
strong

denotes task execution policy

Enumerator
Inline 
Async 

Definition at line 11 of file execution.h.

◆ ExecutionSpace

enum ttg::ExecutionSpace
strong

denotes task execution space

Enumerator
Host 
CUDA 
HIP 
L0 
Invalid 

Definition at line 17 of file execution.h.

◆ Runtime

enum ttg::Runtime
strong
Enumerator
PaRSEC 
MADWorld 

Definition at line 15 of file runtimes.h.

◆ scope

enum ttg::scope
strong
Enumerator
Allocate 
SyncIn 

Definition at line 5 of file devicescope.h.

◆ TaskCoroutineID

enum ttg::TaskCoroutineID
strong

describes all types of coroutine tasks known to TTG

Enumerator
Invalid 

not a coroutine, i.e. a standard task function, -> void

ResumableTask 

-> ttg::resumable_task

DeviceTask 

-> ttg::device::Task

Definition at line 222 of file coroutine.h.

Function Documentation

◆ abort()

void ttg::abort ( )
inline

Aborts the TTG program using the default backend's ttg_abort method.

Definition at line 62 of file run.h.

◆ broadcast() [1/5]

template<size_t i, typename rangeT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcast ( const rangeT &  keylist,
valueT &&  value 
)
inline

Definition at line 428 of file func.h.

◆ broadcast() [2/5]

template<size_t i, typename rangeT , typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcast ( const rangeT &  keylist,
valueT &&  value,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Definition at line 414 of file func.h.

◆ broadcast() [3/5]

template<size_t i, size_t... I, typename... RangesT, typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcast ( const std::tuple< RangesT... > &  keylists,
valueT &&  value 
)
inline

Definition at line 443 of file func.h.

◆ broadcast() [4/5]

template<size_t i, size_t... I, typename... RangesT, typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcast ( const std::tuple< RangesT... > &  keylists,
valueT &&  value,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Definition at line 434 of file func.h.

◆ broadcast() [5/5]

template<typename rangeT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcast ( std::size_t  i,
const rangeT &  keylist,
valueT &&  value 
)
inline

Definition at line 420 of file func.h.

◆ broadcastk() [1/5]

template<size_t i, typename rangeT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcastk ( const rangeT &  keylist)
inline

Definition at line 464 of file func.h.

◆ broadcastk() [2/5]

template<size_t i, typename rangeT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcastk ( const rangeT &  keylist,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Definition at line 452 of file func.h.

◆ broadcastk() [3/5]

template<size_t i, size_t... I, typename... RangesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcastk ( const std::tuple< RangesT... > &  keylists)
inline

Definition at line 477 of file func.h.

◆ broadcastk() [4/5]

template<size_t i, size_t... I, typename... RangesT, typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcastk ( const std::tuple< RangesT... > &  keylists,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Definition at line 470 of file func.h.

◆ broadcastk() [5/5]

template<typename rangeT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::broadcastk ( std::size_t  i,
const rangeT &  keylist 
)
inline

Definition at line 457 of file func.h.

◆ connect() [1/5]

template<std::size_t outindex, std::size_t inindex, typename producer_tt_ptr , typename successor_tt_ptr >
void ttg::connect ( producer_tt_ptr &  p,
successor_tt_ptr &  c 
)
inline

Connect producer output terminal outindex to consumer input terminal inindex (via unique or otherwise wrapped pointers to TTs)

Template Parameters
outindexThe index of the output terminal on the producer.
inindexThe index of the input terminal on the consumer.
Parameters
pThe producer TT
cThe consumer TT

Definition at line 107 of file func.h.

◆ connect() [2/5]

template<std::size_t outindex, std::size_t inindex, typename producer_tt_ptr , typename successor_tt_ptr >
void ttg::connect ( producer_tt_ptr *  p,
successor_tt_ptr *  c 
)
inline

Connect producer output terminal outindex to consumer input terminal inindex (via bare pointers to TTs)

Template Parameters
outindexThe index of the output terminal on the producer.
inindexThe index of the input terminal on the consumer.
Parameters
pThe producer TT
cThe consumer TT

Definition at line 117 of file func.h.

◆ connect() [3/5]

void ttg::connect ( size_t  outindex,
size_t  inindex,
TTBase producer,
TTBase consumer 
)
inline

Connect producer output terminal outindex to consumer input terminal inindex (via TTBase pointers)

Parameters
outindexThe index of the output terminal on the producer.
inindexThe index of the input terminal on the consumer.
producerThe producer TT
consumerThe consumer TT

Definition at line 126 of file func.h.

◆ connect() [4/5]

template<typename keyT , typename valueT >
void ttg::connect ( ttg::Out< keyT, valueT > *  out,
ttg::In< keyT, valueT > *  in 
)
inline

Connect output terminal to successor input terminal.

Parameters
outThe output terminal.
inThe input terminal.

Definition at line 93 of file func.h.

◆ connect() [5/5]

void ttg::connect ( ttg::TerminalBase out,
ttg::TerminalBase in 
)
inline

Connect output terminal to successor input terminal.

Definition at line 98 of file func.h.

◆ default_execution_context()

World ttg::default_execution_context ( )
inline

Accesses the default backend's default execution context.

Note
Dispatches to the ttg_default_execution_context method of the default backend
Returns
the default backend's default execution context

Definition at line 68 of file run.h.

◆ diagnose()

bool ttg::diagnose ( )
inline

Definition at line 12 of file diagnose.h.

◆ diagnose_off()

void ttg::diagnose_off ( )
inline

Definition at line 14 of file diagnose.h.

◆ diagnose_on()

void ttg::diagnose_on ( )
inline

Definition at line 13 of file diagnose.h.

◆ edges()

template<typename... inedgesT>
auto ttg::edges ( inedgesT &&...  args)
inline

Make a tuple of Edges to pass to.

See also
ttg::make_tt.
Parameters
argsvariable argument list of Edges
Returns
A tuple of Edges.
Note
All Edges must have the same prototype.
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 147 of file func.h.

◆ execute()

void ttg::execute ( World  world = default_execution_context())
inline

Starts the execution in the given execution context.

Parameters
worldan execution context associated with the default backend
Note
Dispatches to the ttg_execute method of the default backend
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 74 of file run.h.

◆ fence()

void ttg::fence ( World  world = default_execution_context())
inline

Returns when all tasks associated with the given execution context have finished on all ranks.

Parameters
worldan execution context associated with the default backend
Note
Dispatches to the ttg_fence method of the default backend
This is a collective operation with respect to world
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 81 of file run.h.

◆ finalize() [1/8]

template<std::size_t i>
void ttg::finalize ( )
inline

Finalizes the TTG runtime.

This will possibly try to release as many resources as possible (some resources may only be released at the conclusion of the program). Execution of TTG code is not possible after calling this.

Note
Dispatches to the default backend's ttg_finalize.
This is a collective operation with respect to the default execution context used by the matching initialize call

Definition at line 589 of file func.h.

◆ finalize() [2/8]

template<std::size_t i, typename keyT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::finalize ( const keyT &  key)
inline

Definition at line 564 of file func.h.

◆ finalize() [3/8]

template<size_t i, typename keyT , typename... out_keysT, typename... out_valuesT>
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::finalize ( const keyT &  key,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Finalize streaming input terminals connected to the given output terminal; use this to finalize terminals with non-void key.

Template Parameters
<i>The index of the output terminal through which to finalize connected streaming terminals.
Parameters
keyThe key identifying the tasks for which to finalize the streaming terminal.
tThe task's output terminals.

Definition at line 552 of file func.h.

◆ finalize() [4/8]

template<typename keyT , typename out_keyT , typename out_valueT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::finalize ( const keyT &  key,
ttg::Out< out_keyT, out_valueT > &  t 
)
inline

Finalize streaming input terminals connecting to the given output terminal for tasks identified by key.

Parameters
keyThe key identifying the tasks for which to finalize the streaming terminal.
tThe output terminal through which to finalize connected streaming terminals.
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 543 of file func.h.

◆ finalize() [5/8]

void ttg::finalize ( std::size_t  i)
inline

Definition at line 583 of file func.h.

◆ finalize() [6/8]

template<typename keyT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::finalize ( std::size_t  i,
const keyT &  key 
)
inline

Definition at line 558 of file func.h.

◆ finalize() [7/8]

template<size_t i, typename... out_keysT, typename... out_valuesT>
void ttg::finalize ( std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t)
inline

Finalize streaming input terminals connected to the ith output terminal in the tuple; use this to finalize terminals with void key.

Template Parameters
<i>The index of the output terminal through which to finalize connected streaming terminals.
Parameters
tThe task's output terminals.

Definition at line 579 of file func.h.

◆ finalize() [8/8]

template<typename out_keyT , typename out_valueT >
void ttg::finalize ( ttg::Out< out_keyT, out_valueT > &  t)
inline

Finalize streaming input terminals connected to the given output terminal; use this to finalize terminals with void key.

Parameters
tThe output terminal through which to finalize connected streaming terminals.

Definition at line 571 of file func.h.

◆ fuse()

template<typename keyT , typename... valuesT>
auto ttg::fuse ( const Edge< keyT, valuesT > &...  args)
inline

Fuse edges into one This allows receiving one data from either of the combined edges.

Note
All the types of the edges have to have the same prototype.
The valuesT template argument is used only for variadic arguments.
Parameters
argsThe edges to combine one edge.
Returns
One edge with the same type, combining the input edges.

Definition at line 137 of file func.h.

◆ get_data_descriptor()

template<typename T >
const ttg_data_descriptor* ttg::get_data_descriptor ( )

Definition at line 285 of file data_descriptor.h.

◆ get_default_world()

ttg::World& ttg::get_default_world ( )
inline
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 80 of file world.h.

◆ get_ptr()

template<typename T >
Ptr<std::decay_t<T> > ttg::get_ptr ( T &&  obj)
inline

Definition at line 17 of file ptr.h.

◆ git_description()

const char* ttg::git_description ( )
noexcept

Definition at line 11 of file version.cc.

◆ git_revision()

const char* ttg::git_revision ( )
noexcept

Definition at line 6 of file version.cc.

◆ has_value() [1/2]

template<typename T >
bool ttg::has_value ( std::future< T > const &  f)

Definition at line 13 of file future.h.

◆ has_value() [2/2]

template<typename T >
bool ttg::has_value ( std::shared_future< T > const &  f)

Definition at line 17 of file future.h.

◆ hash_combine()

template<class T >
void ttg::hash_combine ( std::size_t &  seed,
T const &  v 
)
inline

Definition at line 147 of file hash.h.

◆ initialize() [1/2]

template<typename... RestOfArgs>
void ttg::initialize ( int  argc,
char **  argv,
int  num_threads,
RestOfArgs &&...  args 
)
inline

Initializes the TTG runtime with the default backend.

Note
Dispatches to the default backend's ttg_initialize.
This is a collective operation with respect to the default backend's default execution context

Definition at line 31 of file run.h.

◆ initialize() [2/2]

template<typename... RestOfArgs>
void ttg::initialize ( int  argc,
char **  argv,
int  num_threads = -1,
RestOfArgs &&  ... 
)

◆ initialize_fpe()

void ttg::initialize_fpe ( )

Initializes the floating point exceptions.

Enables (if available) FE_DIVBYZERO, FE_INVALID, and FE_OVERFLOW; FE_UNDERFLOW and FE_INEXACT are disabled (if available).

Warning
This should be called from the main thread before any threads have been created (i.e. before madness::initialize()), so that all threads inherit the same floating point environment.

Definition at line 51 of file bug.cpp.

◆ invoke_once() [1/2]

template<typename TT , typename Key >
void ttg::invoke_once ( TT &&  tt,
Key &&  key 
)
inline

Invoke the provided template task tt once with the provided key, on the process provided by the tt's keymap.

Parameters
tta template task to invoke
keythe to invoke the tt on
Note
invoke_once may be called by all processes and must at least be called by the process returned by tt.keymap(key)

Definition at line 110 of file run.h.

◆ invoke_once() [2/2]

template<typename TT >
void ttg::invoke_once ( TT tt)
inline

Invoke the provided template task tt once, on the process provided by the tt's keymap

Parameters
tta template task to invoke
Note
invoke_once may be called by all processes and must at least be called by the process returned by tt.keymap()

Definition at line 97 of file run.h.

◆ launch_debugger()

void ttg::launch_debugger ( int  rank,
const char *  exec_name,
const char *  cmd 
)

Definition at line 445 of file bug.cpp.

◆ launch_gdb()

void ttg::launch_gdb ( int  rank,
const char *  exec_name 
)

Definition at line 458 of file bug.cpp.

◆ launch_lldb()

void ttg::launch_lldb ( int  rank,
const char *  exec_name 
)

Definition at line 457 of file bug.cpp.

◆ log()

template<typename T , typename... Ts>
void ttg::log ( const T &  t,
const Ts &...  ts 
)

atomically prints to std::clog a sequence of items (separated by ttg::print_separator) followed by std::endl

Definition at line 146 of file print.h.

◆ make_graph_executable()

template<typename... TTBasePtrs>
std::enable_if_t<(std::is_convertible_v<decltype(*(std::declval<TTBasePtrs>))), TTBase &> bool ttg::make_graph_executable ( TTBasePtrs &&...  tts)
inline
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 80 of file func.h.

◆ make_ptr()

template<typename T , typename... Args>
Ptr<T> ttg::make_ptr ( Args &&...  args)
inline

Definition at line 12 of file ptr.h.

◆ make_scratch()

template<typename T >
auto ttg::make_scratch ( T *  val,
ttg::scope  scope,
std::size_t  count = 1 
)

Definition at line 13 of file devicescratch.h.

◆ make_shared_constraint()

template<template< typename... > typename Constraint, typename... Args>
auto ttg::make_shared_constraint ( Args &&...  args)

Make a constraint that can be shared between multiple TT instances. Overload for incomplete templated constraint types.

Example: // SequencedKeysConstraint is incomplete auto c = ttg::make_shared_constraint<SequencedKeysConstraint>([](Key& k){ return k[0]; }); auto tt_a = ttg::make_tt<Key>(...); tt_a->add_constraint(c); auto tt_b = ttg::make_tt<Key>(...); tt_b->add_constraint(c);

-> the constraint will handle keys from both tt_a and tt_b. Both TTs must have the same key type.

Make a constraint that can be shared between multiple TT instances. Overload for complete constraint types.

Definition at line 398 of file constraint.h.

◆ make_traverse()

template<typename TTVisitor = decltype(trivial_1param_lambda)&, typename InVisitor = decltype(trivial_1param_lambda)&, typename OutVisitor = decltype(trivial_1param_lambda)&>
auto ttg::make_traverse ( TTVisitor &&  tt_v = trivial_1param_lambda,
InVisitor &&  in_v = trivial_1param_lambda,
OutVisitor &&  out_v = trivial_1param_lambda 
)

Definition at line 205 of file traverse.h.

◆ make_ttg()

template<typename ttseqT , typename input_terminalsT , typename output_terminalsT >
auto ttg::make_ttg ( ttseqT &&  tts,
const input_terminalsT &  ins,
const output_terminalsT &  outs,
const std::string &  name = "ttg" 
)

Definition at line 113 of file tt.h.

◆ operator!=()

bool ttg::operator!= ( const Void ,
const Void  
)
inline

Definition at line 18 of file void.h.

◆ operator<<() [1/2]

template<std::size_t Rank>
std::ostream& ttg::operator<< ( std::ostream &  os,
const MultiIndex< Rank > &  key 
)

Definition at line 83 of file multiindex.h.

◆ operator<<() [2/2]

std::ostream& ttg::operator<< ( std::ostream &  os,
const ttg::Void  
)
inline

Definition at line 20 of file void.h.

◆ operator==()

bool ttg::operator== ( const Void ,
const Void  
)
inline

Definition at line 17 of file void.h.

◆ print()

template<typename T , typename... Ts>
void ttg::print ( const T &  t,
const Ts &...  ts 
)

atomically prints to std::cout a sequence of items (separated by ttg::print_separator) followed by std::endl

Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 130 of file print.h.

◆ print_error()

template<typename T , typename... Ts>
void ttg::print_error ( const T &  t,
const Ts &...  ts 
)

atomically prints to std::cerr a sequence of items (separated by ttg::print_separator) followed by std::endl

Definition at line 138 of file print.h.

◆ rank()

int ttg::rank ( World  world = default_execution_context())
inline
Parameters
worldan execution context to query the process rank from
Note
Calls rank() on world
Examples
distributed.cc.

Definition at line 85 of file run.h.

◆ send() [1/8]

template<size_t i>
void ttg::send ( )
inline

Sends a control message (message without an accompanying task id or a value) to the template tasks attached to the output terminal of this template task.

Note
this is provided to support send<i> with and without explicitly-passed terminal tuple
Template Parameters
<i>Identifies which output terminal of this template task to select for sending

Definition at line 340 of file func.h.

◆ send() [2/8]

template<size_t i, typename keyT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<meta::is_none_void_v<keyT, std::decay_t<valueT> >, void> ttg::send ( const keyT &  key,
valueT &&  value 
)
inline

Sends a task id and a value to the template tasks attached to the output terminal of this template task.

Note
this is provided to support send<i> with and without explicitly-passed terminal tuple
Template Parameters
<i>Identifies which output terminal of this template task to select for sending
Parameters
[in]keythe id of the task(s) receiving the value
[in]valuethe value to send to the receiving task(s)

Definition at line 229 of file func.h.

◆ send() [3/8]

template<size_t i, typename keyT , typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<meta::is_none_void_v<keyT, std::decay_t<valueT> >, void> ttg::send ( const keyT &  key,
valueT &&  value,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Sends a task id and a value to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t.

Template Parameters
<i>Identifies which output terminal in t to select for sending
Parameters
[in]keythe id of the task(s) receiving the value
[in]valuethe value to send to the receiving task(s)
[in]ta tuple of output terminals (typically, this is the output terminal of the template task where this is invoked)

Definition at line 199 of file func.h.

◆ send() [4/8]

template<typename keyT , typename valueT , typename output_terminalT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::send ( const keyT &  key,
valueT &&  value,
ttg::Out< keyT, valueT > &  t 
)
inline

Sends a task id and a value to the given output terminal.

Parameters
[in]keythe id of the task(s) receiving the value
[in]valuethe value to send to the receiving task(s)
[in]tthe output terminal
Examples
distributed.cc, iterative.cc, reducing.cc, and simple.cc.

Definition at line 158 of file func.h.

◆ send() [5/8]

template<typename keyT , typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<meta::is_none_void_v<keyT, std::decay_t<valueT> >, void> ttg::send ( size_t  i,
const keyT &  key,
valueT &&  value 
)
inline

Sends a task id and a value to the template tasks attached to the output terminal of this template task.

Parameters
[in]iIdentifies which output terminal of this template task to select for sending
[in]keythe id of the task(s) receiving the value
[in]valuethe value to send to the receiving task(s)

Definition at line 212 of file func.h.

◆ send() [6/8]

void ttg::send ( std::size_t  i)
inline

Sends a control message (message without an accompanying task id or a value) to the template tasks attached to the output terminal of this template task.

Parameters
[in]iIdentifies which output terminal of this template task to select for sending

Definition at line 329 of file func.h.

◆ send() [7/8]

template<size_t i, typename... out_keysT, typename... out_valuesT>
void ttg::send ( std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t)
inline

Sends a control message (message without an accompanying task id or a value) to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t.

Template Parameters
<i>Identifies which output terminal in t to select for sending
Parameters
[in]ta tuple of output terminals (typically, this is the output terminal of the template task where this is invoked)

Definition at line 321 of file func.h.

◆ send() [8/8]

void ttg::send ( ttg::Out< void, void > &  t)
inline

Sends a control message (message without an accompanying task id or a value) to the given output terminal.

Parameters
[in]tthe output terminal

Definition at line 188 of file func.h.

◆ sendk() [1/4]

template<size_t i, typename keyT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::sendk ( const keyT &  key)
inline

Sends a task id (without an accompanying value) to the template tasks attached to the output terminal of this template task.

Note
this is provided to support sendk<i> with and without explicitly-passed terminal tuple
Template Parameters
<i>Identifies which output terminal of this template task to select for sending
Parameters
[in]keythe id of the task(s) receiving the value

Definition at line 268 of file func.h.

◆ sendk() [2/4]

template<size_t i, typename keyT , typename... out_keysT, typename... out_valuesT>
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::sendk ( const keyT &  key,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Sends a task id (without an accompanying value) to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t.

Template Parameters
<i>Identifies which output terminal in t to select for sending
Parameters
[in]keythe id of the task(s) receiving the value
[in]ta tuple of output terminals (typically, this is the output terminal of the template task where this is invoked)

Definition at line 243 of file func.h.

◆ sendk() [3/4]

template<typename keyT >
void ttg::sendk ( const keyT &  key,
ttg::Out< keyT, void > &  t 
)
inline

Sends a task id (without an accompanying value) to the given output terminal.

Parameters
[in]keythe id of the task(s) receiving the value
[in]tthe output terminal

Definition at line 169 of file func.h.

◆ sendk() [4/4]

template<typename keyT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::sendk ( std::size_t  i,
const keyT &  key 
)
inline

Sends a task id (without an accompanying value) to the template tasks attached to the output terminal of this template task.

Parameters
[in]iIdentifies which output terminal of this template task to select for sending
[in]keythe id of the task(s) receiving the value

Definition at line 254 of file func.h.

◆ sendv() [1/4]

template<typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<!meta::is_void_v<std::decay_t<valueT> >, void> ttg::sendv ( std::size_t  i,
valueT &&  value 
)
inline

Sends a value (without an accompanying task id) to the template tasks attached to the output terminal of this template task.

Parameters
[in]<i>Identifies which output terminal of this template task to select for sending
[in]valuethe value to send to the receiving task(s)

Definition at line 294 of file func.h.

◆ sendv() [2/4]

template<size_t i, typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<!meta::is_void_v<std::decay_t<valueT> >, void> ttg::sendv ( valueT &&  value)
inline

Sends a value (without an accompanying task id) to the template tasks attached to the output terminal of this template task.

Note
this is provided to support sendv<i> with and without explicitly-passed terminal tuple
Template Parameters
<i>Identifies which output terminal of this template task to select for sending
Parameters
[in]valuethe value to send to the receiving task(s)

Definition at line 309 of file func.h.

◆ sendv() [3/4]

template<size_t i, typename valueT , typename... out_keysT, typename... out_valuesT, ttg::Runtime Runtime = ttg::ttg_runtime>
std::enable_if_t<!meta::is_void_v<std::decay_t<valueT> >, void> ttg::sendv ( valueT &&  value,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Sends a value (without an accompanying task id) to the template tasks attached to the output terminal selected in the explicitly given terminal tuple t.

Template Parameters
<i>Identifies which output terminal in t to select for sending
Parameters
[in]valuethe value to send to the receiving task(s)
[in]ta tuple of output terminals (typically, this is the output terminal of the template task where this is invoked)

Definition at line 282 of file func.h.

◆ sendv() [4/4]

template<typename valueT , ttg::Runtime Runtime = ttg::ttg_runtime>
void ttg::sendv ( valueT &&  value,
ttg::Out< void, valueT > &  t 
)
inline

Sends a value (without an accompanying task id) to the given output terminal.

Parameters
[in]valuethe value to send to the receiving task(s)
[in]tthe output terminal
Examples
simple.cc.

Definition at line 179 of file func.h.

◆ SequencedKeysConstraint() [1/4]

template<typename Key , typename Ordinal , typename Compare , typename Mapper >
ttg::SequencedKeysConstraint ( const SequencedKeysConstraint< Key, Ordinal, Compare, Mapper > &  ) -> SequencedKeysConstraint< Key, Ordinal, Compare, Mapper >

◆ SequencedKeysConstraint() [2/4]

template<typename Mapper , typename = std::enable_if_t<std::is_invocable_v<Mapper, std::decay_t<std::tuple_element_t<0, boost::callable_traits::args_t<Mapper>>>>>>
ttg::SequencedKeysConstraint ( Mapper &&  ) -> SequencedKeysConstraint< std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>, std::decay_t< boost::callable_traits::return_type_t< Mapper >>, std::less< std::decay_t< boost::callable_traits::return_type_t< Mapper >>>, std::enable_if_t< std::is_invocable_v< Mapper, std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>>, Mapper > >

◆ SequencedKeysConstraint() [3/4]

template<typename Mapper , typename = std::enable_if_t<std::is_invocable_v<Mapper, std::decay_t<std::tuple_element_t<0, boost::callable_traits::args_t<Mapper>>>>>>
ttg::SequencedKeysConstraint ( Mapper &&  ,
bool   
) -> SequencedKeysConstraint< std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>, std::decay_t< boost::callable_traits::return_type_t< Mapper >>, std::less< std::decay_t< boost::callable_traits::return_type_t< Mapper >>>, std::enable_if_t< std::is_invocable_v< Mapper, std::decay_t< std::tuple_element_t< 0, boost::callable_traits::args_t< Mapper >>>>, Mapper > >

◆ SequencedKeysConstraint() [4/4]

template<typename Key , typename Ordinal , typename Compare , typename Mapper >
ttg::SequencedKeysConstraint ( SequencedKeysConstraint< Key, Ordinal, Compare, Mapper > &&  ) -> SequencedKeysConstraint< Key, Ordinal, Compare, Mapper >

◆ set_size() [1/8]

template<size_t i, typename keyT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::set_size ( const keyT &  key,
const std::size_t  size 
)
inline

Definition at line 507 of file func.h.

◆ set_size() [2/8]

template<size_t i, typename keyT , typename... out_keysT, typename... out_valuesT>
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::set_size ( const keyT &  key,
const std::size_t  size,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Set the size of all streaming input terminals connected to the output terminal for a task identified by key.

Template Parameters
<i>The index of the terminal through which to set the size.
Parameters
keyThe key identifying the task (or tasks) for which to set the streaming terminal size.
sizeTHe size to set (i.e., the number of elements to accumulate).
tThe tasks's output terminals.

Definition at line 494 of file func.h.

◆ set_size() [3/8]

template<typename keyT , typename out_valueT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::set_size ( const keyT &  key,
const std::size_t  size,
ttg::Out< keyT, out_valueT > &  t 
)
inline

Definition at line 484 of file func.h.

◆ set_size() [4/8]

template<std::size_t i>
void ttg::set_size ( const std::size_t  size)
inline

Definition at line 534 of file func.h.

◆ set_size() [5/8]

template<size_t i, typename... out_keysT, typename... out_valuesT>
void ttg::set_size ( const std::size_t  size,
std::tuple< ttg::Out< out_keysT, out_valuesT >... > &  t 
)
inline

Set the size of all streaming input terminals connected to an output terminal for a task, with void key.

Template Parameters
<i>The index of the terminal for which to set the size.
Parameters
sizeTHe size to set (i.e., the number of elements to accumulate).
tThe task's output terminals.

Definition at line 524 of file func.h.

◆ set_size() [6/8]

template<typename out_keyT , typename out_valueT >
void ttg::set_size ( const std::size_t  size,
ttg::Out< out_keyT, out_valueT > &  t 
)
inline

Set the size of all streaming input terminals connected to an output terminal with void key.

Parameters
sizeTHe size to set (i.e., the number of elements to accumulate).
tThe output terminal through which to set the size.

Definition at line 515 of file func.h.

◆ set_size() [7/8]

template<typename keyT >
std::enable_if_t<!meta::is_void_v<keyT>, void> ttg::set_size ( std::size_t  i,
const keyT &  key,
const std::size_t  size 
)
inline

Definition at line 500 of file func.h.

◆ set_size() [8/8]

void ttg::set_size ( std::size_t  i,
const std::size_t  size 
)
inline

Definition at line 528 of file func.h.

◆ size()

int ttg::size ( World  world = default_execution_context())
inline
Parameters
worldan execution context whose number of processes to query
Note
Calls size() on world

Definition at line 89 of file run.h.

◆ trace()

template<typename T , typename... Ts>
void ttg::trace ( const T &  t,
const Ts &...  ts 
)
inline

if trace_enabled()==true and tracing()==true atomically prints to std::clog a sequence of items (separated by ttg::print_separator) followed by std::endl

Definition at line 43 of file trace.h.

◆ trace_enabled()

constexpr bool ttg::trace_enabled ( )
inlineconstexpr

returns whether tracing was enabled at configure time

Definition at line 15 of file trace.h.

◆ trace_off()

void ttg::trace_off ( )
inline

disables tracing; if trace_enabled()==true this has no effect

Definition at line 38 of file trace.h.

◆ trace_on()

void ttg::trace_on ( )
inline

enables tracing; if trace_enabled()==true this has no effect

Definition at line 36 of file trace.h.

◆ tracing()

bool ttg::tracing ( )
inline

returns whether tracing is enabled

To enable tracing invoke trace_on(). To disable tracing

Returns
false, if trace_enabled()==false, otherwise returns true if the most recent call to trace_on() has not been followed by trace_off()

Definition at line 28 of file trace.h.

◆ version()

std::array<int, 3> ttg::version ( )

Definition at line 4 of file version.cc.

Variable Documentation

◆ print_separator

constexpr char ttg::print_separator = ' '
constexpr

Definition at line 12 of file print.h.

◆ print_seq_begin

constexpr char ttg::print_seq_begin = '{'
constexpr

Definition at line 14 of file print.h.

◆ print_seq_end

constexpr char ttg::print_seq_end = '}'
constexpr

Definition at line 15 of file print.h.

◆ print_seq_separator

constexpr char ttg::print_seq_separator = ','
constexpr

Definition at line 13 of file print.h.

◆ ttg_runtime

constexpr const ttg::Runtime ttg::ttg_runtime = ttg::Runtime::MADWorld
constexpr

Definition at line 20 of file import.h.