Taskflow  2.7.0
tf::Taskflow Class Reference

main entry to create a task dependency graph More...

#include <taskflow.hpp>

Inheritance diagram for tf::Taskflow:
Collaboration diagram for tf::Taskflow:

Public Member Functions

 Taskflow (const std::string &name)
 constructs a taskflow with a given name
 
 Taskflow ()
 constructs a taskflow
 
virtual ~Taskflow ()
 destroy the taskflow (virtual call)
 
void dump (std::ostream &ostream) const
 dumps the taskflow to a std::ostream in DOT format More...
 
std::string dump () const
 dumps the taskflow in DOT format to a std::string
 
size_t num_tasks () const
 queries the number of tasks in the taskflow
 
bool empty () const
 queries the emptiness of the taskflow
 
void name (const std::string &)
 sets the name of the taskflow More...
 
const std::stringname () const
 queries the name of the taskflow
 
void clear ()
 clears the associated task dependency graph
 
template<typename V >
void for_each_task (V &&visitor) const
 applies an visitor callable to each task in the taskflow
 
- 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 Topology
 
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

main entry to create a task dependency graph

Member Function Documentation

◆ dump()

void tf::Taskflow::dump ( std::ostream ostream) const
inline

dumps the taskflow to a std::ostream in DOT format

Parameters
ostreama std::ostream target

◆ name()

void tf::Taskflow::name ( const std::string name)
inline

sets the name of the taskflow

Returns
*this

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