![]() |
Taskflow
3.2.0-Master-Branch
|
class to create a pipe object for a pipeline stage More...
#include <pipeline.hpp>
Public Types | |
using | callable_t = C |
alias of the callable type | |
Public Member Functions | |
Pipe ()=default | |
default constructor | |
Pipe (PipeType d, C &&callable) | |
constructs the pipe object | |
PipeType | type () const |
queries the type of the pipe | |
void | type (PipeType type) |
assigns a new type to the pipe | |
template<typename U > | |
void | callable (U &&callable) |
assigns a new callable to the pipe | |
Friends | |
template<typename... Ps> | |
class | Pipeline |
template<typename P > | |
class | ScalablePipeline |
class to create a pipe object for a pipeline stage
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 must take a tf::Pipeflow object in reference:
The pipeflow object is used to query the statistics of a scheduling token in the pipeline, such as pipe, line, and token numbers.
|
inline |
constructs the pipe object
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 must take a tf::Pipeflow object in reference:
When creating a pipeline, the direction of the first pipe must be serial (tf::PipeType::SERIAL).
|
inline |
assigns a new callable to the pipe
U | callable type |
callable | a callable object constructible from std::function<void(tf::Pipeflow&)> |
Assigns a new callable to the pipe with universal forwarding.
|
inline |
queries the type of the pipe
Returns the type of the callable.
|
inline |
assigns a new type to the pipe
type | a tf::PipeType variable |