Porytiles
Loading...
Searching...
No Matches
porytiles2::Pipeline Class Reference

Manages and executes a collection of operations in dependency order. More...

#include <pipeline.hpp>

Public Member Functions

 Pipeline (const std::vector< Operation * > &ops)
 Constructs a pipeline from a collection of operations.
 
ChainableResult< void > run () const
 Executes all operations in the pipeline in dependency order.
 

Detailed Description

Manages and executes a collection of operations in dependency order.

Pipeline builds a dependency graph from a collection of Operation objects based on their input and output declarations. It topologically sorts the operations to determine the correct execution order, ensuring that each operation's inputs are produced before it executes. The pipeline tracks which operations produce each operand and manages the flow of data between operations.

Definition at line 22 of file pipeline.hpp.

Constructor & Destructor Documentation

◆ Pipeline()

porytiles2::Pipeline::Pipeline ( const std::vector< Operation * > &  ops)
explicit

Constructs a pipeline from a collection of operations.

Analyzes the operations' input and output declarations to build a dependency graph, then topologically sorts the operations to determine execution order. The constructor validates that all required inputs can be satisfied by the outputs of other operations in the pipeline.

Parameters
opsVector of pointers to Operation objects

Definition at line 11 of file pipeline.cpp.

Member Function Documentation

◆ run()

ChainableResult< void > porytiles2::Pipeline::run ( ) const

Executes all operations in the pipeline in dependency order.

Runs each operation in the topologically sorted order, passing outputs from earlier operations as inputs to later operations as specified by their declarations. Propagates any errors that occur during execution.

Returns
ChainableResult<void> indicating success or containing an error

Definition at line 66 of file pipeline.cpp.


The documentation for this class was generated from the following files: