|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Pipeline that uses grammar rules for operation composition. More...
#include <ComputePipeline.hpp>
Collaboration diagram for MayaFlux::Yantra::ComputationPipeline< InputType, OutputType >:Public Types | |
| using | input_type = IO< InputType > |
| using | output_type = IO< OutputType > |
Public Member Functions | |
| ComputationPipeline (std::shared_ptr< ComputationGrammar > grammar=nullptr) | |
| Constructor with optional grammar. | |
| template<typename ConcreteOpType > | |
| ComputationPipeline & | add_operation (std::shared_ptr< ConcreteOpType > operation, const std::string &name="") |
| Add a concrete operation instance to the pipeline. | |
| template<typename ConcreteOpType , typename... Args> | |
| ComputationPipeline & | create_operation (const std::string &name="", Args &&... args) |
| Create and add operation by type. | |
| output_type | process (const input_type &input, const ExecutionContext &context={}) |
| Execute the pipeline with grammar rule application. | |
| std::shared_ptr< ComputationGrammar > | get_grammar () const |
| Get the grammar instance. | |
| void | set_grammar (std::shared_ptr< ComputationGrammar > grammar) |
| Set grammar instance. | |
| template<typename ConcreteOpType > | |
| std::shared_ptr< ConcreteOpType > | get_operation (const std::string &name) const |
| Get operation by name. | |
| template<typename ConcreteOpType > | |
| bool | configure_operation (const std::string &name, const std::function< void(std::shared_ptr< ConcreteOpType >)> &configurator) |
| Configure operation by name. | |
| size_t | operation_count () const |
| Get number of operations in pipeline. | |
| void | clear_operations () |
| Clear all operations. | |
| std::vector< std::string > | get_operation_names () const |
| Get all operation names in the pipeline. | |
| bool | remove_operation (const std::string &name) |
| Remove operation by name. | |
Private Attributes | |
| std::shared_ptr< ComputationGrammar > | m_grammar |
| Grammar instance for rule-based operation selection. | |
| std::vector< std::pair< std::shared_ptr< ComputeOperation< InputType, OutputType > >, std::string > > | m_operations |
| Operations and their names in execution order. | |
Pipeline that uses grammar rules for operation composition.
| InputType | Input data type (defaults to std::vector<Kakshya::DataVariant>) |
| OutputType | Output data type (defaults to InputType) |
The ComputationPipeline provides a flexible, grammar-aware system for chaining computational operations in sequence. Unlike traditional pipelines that execute operations in a fixed order, this pipeline can dynamically select and apply operations based on grammar rules that match input data characteristics and execution context.
Grammar Integration: Uses ComputationGrammar to intelligently select and configure operations based on input data properties and context.
Type Safety: Template-based design ensures type compatibility between pipeline stages while supporting different input/output types.
Dynamic Configuration: Operations can be added, configured, and removed at runtime, enabling adaptive processing workflows.
Error Handling: Comprehensive error handling with operation-specific error reporting and graceful degradation.
Definition at line 67 of file ComputePipeline.hpp.