tt.h File Reference
#include "ttg/config.h"
#include "ttg/fwd.h"
#include "ttg/base/tt.h"
#include "ttg/edge.h"
#include "ttg/coroutine.h"
#include <cassert>
#include <memory>
#include <vector>

Classes

class  ttg::TTG< input_terminalsT, output_terminalsT >
 a template task graph implementation More...
 
class  ttg::SinkTT< keyT, input_valueT >
 A data sink for one input. More...
 

Namespaces

 ttg
 top-level TTG namespace contains runtime-neutral functionality
 

Macros

#define TTG_PROCESS_TT_OP_RETURN(result, id, invoke)
 

Functions

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")
 

Macro Definition Documentation

◆ TTG_PROCESS_TT_OP_RETURN

#define TTG_PROCESS_TT_OP_RETURN (   result,
  id,
  invoke 
)
Value:
{ \
using return_type = decltype(invoke); \
if constexpr (std::is_same_v<return_type, void>) { \
invoke; \
} else { \
auto coro_return = invoke; \
static_assert(std::is_same_v<return_type, void> || \
std::is_base_of_v<ttg::coroutine_handle<ttg::resumable_task_state>, decltype(coro_return)>|| \
decltype(coro_return)>); \
if constexpr (std::is_base_of_v<ttg::coroutine_handle<ttg::resumable_task_state>, decltype(coro_return)>) \
else if constexpr (std::is_base_of_v< \
decltype(coro_return)>) \
result = coro_return.address(); \
} \
}
void abort()
Aborts the TTG program using the default backend's ttg_abort method.
Definition: run.h:62
TTG_CXX_COROUTINE_NAMESPACE::coroutine_handle< Promise > coroutine_handle
Definition: coroutine.h:24
@ ResumableTask
-> ttg::resumable_task
@ Invalid
not a coroutine, i.e. a standard task function, -> void
@ DeviceTask
-> ttg::device::Task

Definition at line 181 of file tt.h.