22 template <
template<
typename...>
typename E>
94 template <
typename... Ts>
124 template <
typename... Ts>
156 Node* _node {
nullptr};
161 template <
typename S>
164 template <
typename S>
204 template <
typename... Ts>
206 (_node->precede(*(tgts._node)), ...);
223 template <
typename... Bs>
225 (tgts._node->precede(*_node), ...);
230 template <
typename S>
231 void Task::_gather(S& tgts) {
232 for(
auto& from : tgts) {
233 from._node->precede(*_node);
238 template <
typename S>
239 void Task::_precede(S& tgts) {
240 for(
auto& to : tgts) {
241 _node->precede(*(to._node));
269 template <
typename C>
271 _node->_work = std::forward<C>(c);
288 return _node->num_dependents();
293 return _node->num_successors();
size_t num_dependents() const
queries the number of predecessors of the task
Definition: task.hpp:287
The base class to derive a taskflow class.
Definition: basic_taskflow.hpp:38
Task & gather(Ts &&... tasks)
adds precedence links from other tasks to this
Definition: task.hpp:224
Definition: taskflow.hpp:6
Task & operator=(const Task &)
replaces the contents with a copy of the other task
Definition: task.hpp:258
const std::string & name() const
queries the name of the task
Definition: task.hpp:282
The building blocks of task dependency graphs.
Definition: flow_builder.hpp:13
size_t num_successors() const
queries the number of successors of the task
Definition: task.hpp:292
Handle to modify and access a task.
Definition: task.hpp:18
Task & precede(Ts &&... tasks)
adds precedence links from this to other tasks
Definition: task.hpp:205
Task()=default
constructs an empty task
Task & work(C &&callable)
assigns a new callable object to the task
Definition: task.hpp:270