Back to Taskflow

tf::Pipeflow class

docs/classtf_1_1Pipeflow.html

4.0.01.7 KB
Original Source

tf::Pipeflow class

class to create a pipeflow object used by the pipe callable

Pipeflow represents a scheduling token in the pipeline scheduling framework. A pipeflow is created by the pipeline scheduler at runtime to pass to the pipe callable. Users can query the present statistics of that scheduling token, including the line identifier, pipe identifier, and token identifier, and build their application algorithms based on these statistics. At the first stage, users can explicitly call the stop method to stop the pipeline scheduler.

tf::Pipe{tf::PipeType::SERIAL, [](tf::Pipeflow& pf){std::cout \<\< "token id=" \<\< pf.token()\<\< " at line=" \<\< pf.line()\<\< " at pipe=" \<\< pf.pipe()\<\< '\n';}};

Pipeflow can only be created privately by the tf::Pipeline and be used through the pipe callable.

Constructors, destructors, conversion operators

Pipeflow() defaulteddefault constructor

Public functions

auto line() const -> size_tqueries the line identifier of the present tokenauto pipe() const -> size_tqueries the pipe identifier of the present tokenauto token() const -> size_tqueries the token identifiervoid stop()stops the pipeline scheduling

Function documentation

void tf::Pipeflow::stop()

stops the pipeline scheduling

Only the first pipe can call this method to stop the pipeline. Calling stop from other pipes will throw exception.