13 #ifndef THRILL_API_ACTION_NODE_HEADER 14 #define THRILL_API_ACTION_NODE_HEADER 31 const std::initializer_list<size_t>&
parent_ids,
32 const std::initializer_list<DIABasePtr>&
parents)
33 :
DIABase(ctx, label, parent_ids, parents) { }
43 {
return std::vector<DIABase*>(); }
52 die(
"Setting .Keep() on Actions does not make sense.");
56 die(
"Setting .Keep() on Actions does not make sense.");
60 die(
"Setting .Keep() on Actions does not make sense.");
64 template <
typename ResultType>
69 const std::initializer_list<size_t>&
parent_ids,
70 const std::initializer_list<DIABasePtr>&
parents)
71 :
ActionNode(ctx, label, parent_ids, parents) { }
74 virtual const ResultType& result()
const = 0;
82 template <
typename ValueType =
void>
104 const ValueType&
get() {
108 return node_->result();
112 const ValueType& operator () () {
146 void operator () () {
160 template <
typename ValueType =
void>
165 #endif // !THRILL_API_ACTION_NODE_HEADER ActionResultNodePtr node_
shared pointer to the action node, which may not be executed yet.
The DIABase has not been computed yet.
Future(const ActionNodePtr &node)
std::vector< size_t > parent_ids() const
Returns the parents of this DIABase.
const std::vector< DIABasePtr > & parents() const
Returns the parents of this DIABase.
const char * label() const
return label() of DIANode subclass as stored by StatsNode
void RemoveChild(DIABase *) final
ActionNodes do not have children.
#define die(msg)
Instead of std::terminate(), throw the output the message via an exception.
The Context of a job is a unique instance per worker which holds references to all underlying parts o...
void wait()
Evaluate the DIA data-flow graph for this ActionFuture.
void DecConsumeCounter(size_t) final
The DIABase is the untyped super class of DIANode.
ActionNodePtr node_
shared pointer to the action node, which may not be executed yet.
ActionResultNode(Context &ctx, const char *label, const std::initializer_list< size_t > &parent_ids, const std::initializer_list< DIABasePtr > &parents)
bool valid() const
true if already executed/valid
void IncConsumeCounter(size_t) final
The return type class for all ActionFutures.
std::vector< DIABase * > children() const final
ActionNodes do not have children.
ActionNode(Context &ctx, const char *label, const std::initializer_list< size_t > &parent_ids, const std::initializer_list< DIABasePtr > &parents)
void PushData(bool) final
ActionNodes do not push data, they only Execute.
bool valid() const
true if already executed/valid
void RemoveAllChildren() final
ActionNodes do not have children.
void RunPushData() final
ActionNodes do not push data, they only Execute.
Future(const ActionResultNodePtr &node)
void SetConsumeCounter(size_t) final
void wait()
Evaluate the DIA data-flow graph for this ActionFuture.