Taskflow  2.7.0
tf::Subflow Class Reference

building methods of a subflow graph in dynamic tasking More...

#include <flow_builder.hpp>

Inheritance diagram for tf::Subflow:
Collaboration diagram for tf::Subflow:

Public Member Functions

void join ()
 enables the subflow to join its parent task More...
 
void detach ()
 enables the subflow to detach from its parent task More...
 
bool joinable () const
 queries if the subflow is joinable More...
 
- Public Member Functions inherited from tf::FlowBuilder
template<typename C >
std::enable_if_t< is_static_task_v< C >, Taskemplace (C &&callable)
 creates a static task from a given callable object More...
 
template<typename C >
std::enable_if_t< is_dynamic_task_v< C >, Taskemplace (C &&callable)
 creates a dynamic task from a given callable object More...
 
template<typename C >
std::enable_if_t< is_condition_task_v< C >, Taskemplace (C &&callable)
 creates a condition task from a given callable object More...
 
template<typename C >
std::enable_if_t< is_cudaflow_task_v< C >, Taskemplace (C &&callable)
 creates a cudaflow task from a given callable object More...
 
template<typename... C, std::enable_if_t<(sizeof...(C)> 1>
auto emplace (C &&... callables)
 creates multiple tasks from a list of callable objects More...
 
Task composed_of (Taskflow &taskflow)
 creates a module task from a taskflow More...
 
Task placeholder ()
 creates an empty task More...
 
void linearize (std::vector< Task > &tasks)
 adds adjacent dependency links to a linear list of tasks More...
 
void linearize (std::initializer_list< Task > tasks)
 adds adjacent dependency links to a linear list of tasks More...
 
template<typename B , typename E , typename C >
Task for_each (B &&first, E &&last, C &&callable)
 constructs a STL-styled parallel-for task More...
 
template<typename B , typename E , typename C , typename H = size_t>
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 More...
 
template<typename B , typename E , typename C , typename H = size_t>
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 More...
 
template<typename B , typename E , typename C , typename H = size_t>
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 More...
 
template<typename B , typename E , typename S , typename C >
Task for_each_index (B &&first, E &&last, S &&step, C &&callable)
 constructs an index-based parallel-for task More...
 
template<typename B , typename E , typename S , typename C , typename H = size_t>
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. More...
 
template<typename B , typename E , typename S , typename C , typename H = size_t>
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. More...
 
template<typename B , typename E , typename S , typename C , typename H = size_t>
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. More...
 
template<typename B , typename E , typename T , typename O >
Task reduce (B &&first, E &&last, T &init, O &&bop)
 constructs a STL-styled parallel-reduce task More...
 
template<typename B , typename E , typename T , typename O , typename H = size_t>
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 More...
 
template<typename B , typename E , typename T , typename O , typename H = size_t>
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 More...
 
template<typename B , typename E , typename T , typename O , typename H = size_t>
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 More...
 
template<typename B , typename E , typename T , typename BOP , typename UOP >
Task transform_reduce (B &&first, E &&last, T &init, BOP &&bop, UOP &&uop)
 constructs a STL-styled parallel transform-reduce task More...
 
template<typename B , typename E , typename T , typename BOP , typename UOP , typename H = size_t>
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 More...
 
template<typename B , typename E , typename T , typename BOP , typename UOP , typename H = size_t>
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 More...
 
template<typename B , typename E , typename T , typename BOP , typename UOP , typename H = size_t>
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 More...
 

Friends

class Executor
 
class FlowBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from tf::FlowBuilder
 FlowBuilder (Graph &graph)
 constructs a flow builder with a graph
 
- Protected Attributes inherited from tf::FlowBuilder
Graph & _graph
 associated graph object
 

Detailed Description

building methods of a subflow graph in dynamic tasking

By default, a subflow automatically joins its parent node. You may explicitly join or detach a subflow by calling Subflow::join or Subflow::detach.

Member Function Documentation

◆ detach()

void tf::Subflow::detach ( )
inline

enables the subflow to detach from its parent task

Performs an immediate action to detach the subflow. Once the subflow is detached, it is considered finished and you may not modify the subflow anymore.

◆ join()

void tf::Subflow::join ( )
inline

enables the subflow to join its parent task

Performs an immediate action to join the subflow. Once the subflow is joined, it is considered finished and you may not modify the subflow anymore.

◆ joinable()

bool tf::Subflow::joinable ( ) const
inline

queries if the subflow is joinable

When a subflow is joined or detached, it becomes not joinable.


The documentation for this class was generated from the following files: