fwd.h
Go to the documentation of this file.
1 #ifndef TTG_FWD_H
2 #define TTG_FWD_H
3 
9 // namespaces first ////////////////////////////////////////////////////////////////////////////////////////////////////
10 
12 namespace ttg {}
13 // predeclare runtime-specific namespaces
14 // note that these are top-level (but differ from the namespaces reserved by the runtime itself to avoid ambiguities)
16 namespace ttg_madness {}
18 namespace ttg_parsec {}
19 
20 // classes + functions /////////////////////////////////////////////////////////////////////////////////////////////////
21 
22 namespace ttg {
23 
24  class TTBase;
25 
27  using OpBase [[deprecated("use TTBase instead")]] = TTBase;
30 
31  template <typename keyT = void, typename valueT = void>
32  class Edge;
33 
34  template <typename input_terminalsT, typename output_terminalsT>
35  class TTG;
36 
38  template <typename input_terminalsT, typename output_terminalsT>
40 
42  template <typename input_terminalsT, typename output_terminalsT>
43  using CompositeOp [[deprecated("use TTG instead")]] = TTG<input_terminalsT, output_terminalsT>;
44 
45  class World;
46 
47  template <typename... RestOfArgs>
48  void initialize(int argc, char **argv, int num_threads = -1, RestOfArgs &&...);
49  void finalize();
50  [[noreturn]]
51  void abort();
53  void execute(ttg::World world);
54  void fence(ttg::World world);
55 
56 } // namespace ttg
57 
58 #include "ttg/impl_selector.h"
59 #if TTG_USE_PARSEC
60 #include "ttg/parsec/fwd.h"
61 #endif
62 #if TTG_USE_MADNESS
63 #include "ttg/madness/fwd.h"
64 #endif
65 
66 #endif // TTG_FWD_H
Edge is used to connect In and Out terminals.
Definition: edge.h:25
A base class for all template tasks.
Definition: tt.h:30
a template task graph implementation
Definition: tt.h:31
int num_threads()
Determine the number of compute threads to use by TTG when not given to ttg::initialize
Definition: env.cpp:15
this contains MADNESS-based TTG functionality
Definition: fwd.h:16
this contains PaRSEC-based TTG functionality
Definition: fwd.h:18
top-level TTG namespace contains runtime-neutral functionality
Definition: keymap.h:8
void execute(ttg::World world)
Starts the execution in the given execution context.
Definition: run.h:74
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.
Definition: run.h:62
World default_execution_context()
Accesses the default backend's default execution context.
Definition: run.h:68
void fence(ttg::World world)
Returns when all tasks associated with the given execution context have finished on all ranks.
Definition: run.h:81
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 ke...
Definition: func.h:543