#include <taskflow/algorithm/pipeline.hpp>
template<typename C = std:: function<void(tf:: Pipeflow&)>>
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::
Pipe{PipeType::SERIAL, [](tf::Pipeflow&){}}
The pipeflow object is used to query the statistics of a scheduling token in the pipeline, such as pipe, line, and token numbers.
Public types
- using callable_t = C
- alias of the callable type
Constructors, destructors, conversion operators
Public functions
Function documentation
template<typename C>
tf:: Pipe<C>:: Pipe(PipeType d,
C&& callable)
constructs the pipe object
Parameters | |
---|---|
d | pipe type (tf:: |
callable | callable type |
The constructor constructs a pipe with the given direction (tf::
Pipe{PipeType::SERIAL, [](tf::Pipeflow&){}}
When creating a pipeline, the direction of the first pipe must be serial (tf::
template<typename C>
void tf:: Pipe<C>:: type(PipeType type)
assigns a new type to the pipe
Parameters | |
---|---|
type | a tf:: |
template<typename C>
template<typename U>
void tf:: Pipe<C>:: callable(U&& callable)
assigns a new callable to the pipe
Template parameters | |
---|---|
U | callable type |
Parameters | |
callable | a callable object constructible from std::function<void(tf::Pipeflow&)> |
Assigns a new callable to the pipe with universal forwarding.