template<typename C>
tf::Pipe class

class to create a pipe object for a pipeline stage

Template parameters
C callable type

A pipe represents a stage of a pipeline. A pipe can be either parallel direction or serial direction (specified by tf::PipeType) and is coupled with a callable to invoke by the pipeline scheduler. The callable is one of the following possible forms:

Pipe{PipeType::SERIAL, [](tf::Pipeflow&){}}
Pipe{PipeType::SERIAL, [](tf::Pipeflow&, tf::Runtime&){}}

The first version takes a pipeflow object for user to to query the present statistics of a pipeline scheduling token. The second version takes an additional runtime object for users to interact with the taskflow scheduler, such as scheduling a task and spawning a subflow.

Public types

using callable_t = C
alias of the callable type

Constructors, destructors, conversion operators

Pipe(PipeType d, C&& callable)
constructs the pipe object

Function documentation

template<typename C>
tf::Pipe<C>::Pipe(PipeType d, C&& callable)

constructs the pipe object

Parameters
d pipe type (tf::PipeType)
callable callable type

The constructor constructs a pipe with the given direction (either tf::PipeType::SERIAL or tf::PipeType::PARALLEL) and the given callable. The callable is one of the following possible forms:

Pipe{PipeType::SERIAL, [](tf::Pipeflow&){}}
Pipe{PipeType::SERIAL, [](tf::Pipeflow&, tf::Runtime&){}}

When creating a pipeline, the direction of the first pipe must be serial (tf::PipeType::SERIAL).