29 std::enable_if_t<is_static_task_v<C>,
Task>
emplace(C&& callable);
41 std::enable_if_t<is_dynamic_task_v<C>,
Task>
emplace(C&& callable);
53 std::enable_if_t<is_condition_task_v<C>,
Task>
emplace(C&& callable);
66 std::enable_if_t<is_cudaflow_task_v<C>,
Task>
emplace(C&& callable);
78 template <
typename... C, std::enable_if_t<(
sizeof...(C)>1),
void>* =
nullptr>
141 template <
typename B,
typename E,
typename C>
165 template <
typename B,
typename E,
typename C,
typename H =
size_t>
189 template <
typename B,
typename E,
typename C,
typename H =
size_t>
213 template <
typename B,
typename E,
typename C,
typename H =
size_t>
215 B&& beg, E&& end, C&& callable, H&& chunk_size = 0
254 template <
typename B,
typename E,
typename S,
typename C>
280 template <
typename B,
typename E,
typename S,
typename C,
typename H =
size_t>
282 B&& beg, E&& end, S&& step, C&& callable, H&& chunk_size = 1
308 template <
typename B,
typename E,
typename S,
typename C,
typename H =
size_t>
310 B&& beg, E&& end, S&& step, C&& callable, H&& chunk_size = 1
336 template <
typename B,
typename E,
typename S,
typename C,
typename H =
size_t>
338 B&& beg, E&& end, S&& step, C&& callable, H&& chunk_size = 0
372 template <
typename B,
typename E,
typename T,
typename O>
373 Task reduce(B&& first, E&& last, T& init, O&& bop);
396 template <
typename B,
typename E,
typename T,
typename O,
typename H =
size_t>
398 B&& first, E&& last, T& init, O&& bop, H&& chunk_size = 1
422 template <
typename B,
typename E,
typename T,
typename O,
typename H =
size_t>
424 B&& first, E&& last, T& init, O&& bop, H&& chunk_size = 1
448 template <
typename B,
typename E,
typename T,
typename O,
typename H =
size_t>
450 B&& first, E&& last, T& init, O&& bop, H&& chunk_size = 0
486 template <
typename B,
typename E,
typename T,
typename BOP,
typename UOP>
512 template <
typename B,
typename E,
typename T,
typename BOP,
typename UOP,
typename H =
size_t>
514 B&& first, E&& last, T& init, BOP&& bop, UOP&& uop, H&& chunk_size = 1
540 template <
typename B,
typename E,
typename T,
typename BOP,
typename UOP,
typename H =
size_t>
542 B&& first, E&& last, T& init, BOP&& bop, UOP&& uop, H&& chunk_size = 0
568 template <
typename B,
typename E,
typename T,
typename BOP,
typename UOP,
typename H =
size_t>
570 B&& first, E&& last, T& init, BOP&& bop, UOP&& uop, H&& chunk_size = 1
588 template <
typename L>
598 template <
typename... C, std::enable_if_t<(
sizeof...(C)>1),
void>*>
600 return std::make_tuple(
emplace(std::forward<C>(cs))...);
605 template <
typename C>
607 auto n =
_graph.emplace_back(
608 nstd::in_place_type_t<Node::StaticWork>{}, std::forward<C>(c)
615 template <
typename C>
617 auto n =
_graph.emplace_back(
618 nstd::in_place_type_t<Node::DynamicWork>{}, std::forward<C>(c)
625 template <
typename C>
627 auto n =
_graph.emplace_back(
628 nstd::in_place_type_t<Node::ConditionWork>{}, std::forward<C>(c)
633 #ifdef TF_ENABLE_CUDA 636 template <
typename C>
638 auto n =
_graph.emplace_back(
639 nstd::in_place_type_t<Node::cudaFlowWork>{}, std::forward<C>(c)
647 auto node =
_graph.emplace_back(
648 nstd::in_place_type_t<Node::ModuleWork>{}, &taskflow
655 auto node =
_graph.emplace_back();
660 template <
typename L>
661 void FlowBuilder::_linearize(L& keys) {
663 auto itr = keys.begin();
664 auto end = keys.end();
672 for(++nxt; nxt != end; ++nxt, ++itr) {
673 itr->_node->_precede(nxt->_node);
735 bool _joinable {
true};
739 inline Subflow::Subflow(
Executor& executor, Node* parent, Graph& graph) :
741 _executor {executor},
void linearize(std::vector< Task > &tasks)
adds adjacent dependency links to a linear list of tasks
Definition: flow_builder.hpp:678
bool joinable() const
queries if the subflow is joinable
Definition: flow_builder.hpp:746
Task for_each_index_guided(B &&beg, E &&end, S &&step, C &&callable, H &&chunk_size=1)
constructs an index-based parallel-for task using the guided partition algorithm. ...
Task transform_reduce_guided(B &&first, E &&last, T &init, BOP &&bop, UOP &&uop, H &&chunk_size=1)
constructs a STL-styled parallel transform-reduce task using the guided partition algorithm ...
Task transform_reduce_static(B &&first, E &&last, T &init, BOP &&bop, UOP &&uop, H &&chunk_size=0)
constructs a STL-styled parallel transform-reduce task using the static partition algorithm ...
Task for_each_guided(B &&beg, E &&end, C &&callable, H &&chunk_size=1)
constructs a STL-styled parallel-for task using the guided partition algorithm
Task transform_reduce_dynamic(B &&first, E &&last, T &init, BOP &&bop, UOP &&uop, H &&chunk_size=1)
constructs a STL-styled parallel transform-reduce task using the dynamic partition algorithm ...
Task for_each_static(B &&beg, E &&end, C &&callable, H &&chunk_size=0)
constructs a STL-styled parallel-for task using the dynamic partition algorithm
Graph & _graph
associated graph object
Definition: flow_builder.hpp:584
Task placeholder()
creates an empty task
Definition: flow_builder.hpp:654
void detach()
enables the subflow to detach from its parent task
Definition: executor.hpp:1393
Task reduce_dynamic(B &&first, E &&last, T &init, O &&bop, H &&chunk_size=1)
constructs a STL-styled parallel-reduce task using the dynamic partition algorithm ...
Task reduce_static(B &&first, E &&last, T &init, O &&bop, H &&chunk_size=0)
constructs a STL-styled parallel-reduce task using the static partition algorithm ...
Task for_each_index_static(B &&beg, E &&end, S &&step, C &&callable, H &&chunk_size=0)
constructs an index-based parallel-for task using the static partition algorithm. ...
Task for_each_index(B &&first, E &&last, S &&step, C &&callable)
constructs an index-based parallel-for task
std::enable_if_t< is_static_task_v< C >, Task > emplace(C &&callable)
creates a static task from a given callable object
Definition: flow_builder.hpp:606
Task composed_of(Taskflow &taskflow)
creates a module task from a taskflow
Definition: flow_builder.hpp:646
Task reduce(B &&first, E &&last, T &init, O &&bop)
constructs a STL-styled parallel-reduce task
main entry to create a task dependency graph
Definition: core/taskflow.hpp:18
Task for_each_dynamic(B &&beg, E &&end, C &&callable, H &&chunk_size=1)
constructs a STL-styled parallel-for task using the dynamic partition algorithm
FlowBuilder(Graph &graph)
constructs a flow builder with a graph
Definition: flow_builder.hpp:593
Task for_each(B &&first, E &&last, C &&callable)
constructs a STL-styled parallel-for task
building methods of a task dependency graph
Definition: flow_builder.hpp:13
handle to a node in a task dependency graph
Definition: task.hpp:115
Task for_each_index_dynamic(B &&beg, E &&end, S &&step, C &&callable, H &&chunk_size=1)
constructs an index-based parallel-for task using the dynamic partition algorithm.
Task transform_reduce(B &&first, E &&last, T &init, BOP &&bop, UOP &&uop)
constructs a STL-styled parallel transform-reduce task
execution interface for running a taskflow graph
Definition: executor.hpp:24
building methods of a subflow graph in dynamic tasking
Definition: flow_builder.hpp:698
void join()
enables the subflow to join its parent task
Definition: executor.hpp:1383
Task reduce_guided(B &&first, E &&last, T &init, O &&bop, H &&chunk_size=1)
constructs a STL-styled parallel-reduce task using the guided partition algorithm ...