|
Grok 20.3.2
|
A collection of tasks which can be scheduled as a single task. More...
#include <FlowComponent.h>
Public Member Functions | |
| void | addTo (tf::Taskflow &composition) |
| Composes this FlowComponent's tf::Taskflow with another tf::Taskflow. | |
| void | precede (FlowComponent &successor) |
| Schedule this FlowComponent before another FlowComponent. | |
| void | precede (tf::Task &successor) |
| Schedule this Taskflow before another FlowComponent. | |
| tf::Task & | getCompositionTask (void) |
| void | conditional_precede (FlowComponent *root, FlowComponent *successor, std::function< int()> condition_lambda) |
| Conditionally schedule successor based on condition_lambda. | |
| FlowComponent * | name (const std::string &name) |
| Gets name of composition task. | |
| tf::Task & | nextTask () |
| Gets next task placeholder for componentFlow_. | |
Private Attributes | |
| std::vector< tf::Task > | componentTasks_ |
| A std::vector of tf::Task belonging to this FlowComponent. | |
| tf::Task | compositionTask_ |
| tf::Task for the composition of this tf::Taskflow with another tf::Taskflow | |
A collection of tasks which can be scheduled as a single task.
|
inline |
Composes this FlowComponent's tf::Taskflow with another tf::Taskflow.
| composition | tf::Taskflow that is composed of itself and this tf::Taskflow |
References compositionTask_.
Referenced by grk::TileProcessorCompress::buildCompressDAG().
|
inline |
Conditionally schedule successor based on condition_lambda.
When condition returns 0, successor runs. When 1, a noop dead-end runs instead, effectively skipping the rest of the chain. This is required (not just an optimization) because module tasks like CodecScheduler cannot safely execute when prior stages have errored — their internal taskflow may contain stale tasks referencing freed state. Replacing this with a simple linear chain + early-return guards in lambdas was tried and caused segfaults.
References getCompositionTask(), name(), and precede().
|
inline |
References compositionTask_.
Referenced by conditional_precede().
|
inline |
Gets name of composition task.
| name | name of composition task |
References compositionTask_, and name().
Referenced by conditional_precede(), and name().
|
inline |
Gets next task placeholder for componentFlow_.
References componentTasks_.
Referenced by grk::CompressScheduler::populateT1Flow(), and grk::DecompressScheduler::scheduleT1().
|
inline |
Schedule this FlowComponent before another FlowComponent.
| successor | reference to FlowComponent that will succeed this FlowComponent |
References compositionTask_.
Referenced by grk::TileProcessorCompress::buildCompressDAG(), and conditional_precede().
|
inline |
Schedule this Taskflow before another FlowComponent.
| successor | pointer to Taskflow that will succeed this FlowComponent |
References compositionTask_.
|
private |
A std::vector of tf::Task belonging to this FlowComponent.
Referenced by nextTask().
|
private |
tf::Task for the composition of this tf::Taskflow with another tf::Taskflow
Referenced by addTo(), getCompositionTask(), name(), precede(), and precede().