|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Base interface for all computational operations in the processing pipeline. More...
#include <ComputeOperation.hpp>
Inheritance diagram for MayaFlux::Yantra::ComputeOperation< InputType, OutputType >:
Collaboration diagram for MayaFlux::Yantra::ComputeOperation< InputType, OutputType >:Public Types | |
| using | input_type = IO< InputType > |
| using | output_type = IO< OutputType > |
Public Member Functions | |
| ComputeOperation () | |
| Constructor with data type validation warnings. | |
| virtual | ~ComputeOperation ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| output_type | apply_operation (const input_type &input) |
| Public synchronous execution interface. | |
| output_type | apply_operation_with_dependencies (const input_type &input) |
| Applies the operation with dependencies resolved. | |
| output_type | operator() (const InputType &data) |
| Convenience overload for direct data processing (backward compatibility) | |
| OutputType | apply_to_data (const InputType &data) |
| Convenience overload that extracts just the data from result. | |
| virtual void | set_parameter (const std::string &name, std::any value)=0 |
| Sets a named parameter that configures the operation's behavior. | |
| virtual std::any | get_parameter (const std::string &name) const =0 |
| Retrieves a parameter's current value. | |
| virtual std::map< std::string, std::any > | get_all_parameters () const |
| Retrieves all parameters and their values. | |
| virtual bool | validate_input (const input_type &) const |
| Validates if the input data meets the operation's requirements. | |
| virtual std::string | get_name () const |
| Get operation name for debugging/introspection. | |
| output_type | execute (const input_type &input) |
| OpUnit interface - operations can act as units in dependency graphs. | |
| void | add_dependency (std::shared_ptr< ComputeOperation > dep) |
| const auto & | get_dependencies () const |
| virtual void | set_container_for_regions (const std::shared_ptr< Kakshya::SignalSourceContainer > &container) |
| virtual const std::shared_ptr< Kakshya::SignalSourceContainer > & | get_container_for_regions () const |
| void | set_last_execution_context (const ExecutionContext &ctx) |
| const ExecutionContext & | get_last_execution_context () const |
| void | set_pre_execution_hook (const OpererationHookCallback &hook) |
| void | set_post_execution_hook (const OpererationHookCallback &hook) |
| void | set_reconstruction_callback (const ReconstructionCallback &callback) |
Protected Member Functions | |
| virtual output_type | operation_function (const input_type &input)=0 |
| Executes the computational transformation on the input data. | |
| virtual output_type | apply_operation_internal (const input_type &input, const ExecutionContext &context) |
| Internal execution method - ComputeMatrix can access this. | |
| virtual std::future< output_type > | apply_operation_async (const input_type &input) |
| Optional async implementation - default delegates to operation_function. | |
| virtual output_type | apply_operation_parallel (const input_type &input, const ExecutionContext &ctx) |
| Optional parallel-aware implementation - default delegates to operation_function. | |
| virtual output_type | apply_operation_chained (const input_type &input, const ExecutionContext &ctx) |
| Optional chain-aware implementation - default delegates to operation_function. | |
| output_type | convert_result (std::vector< std::vector< double > > &result_data, DataStructureInfo &metadata) |
| Convert processed double data back to OutputType using metadata and optional callback. | |
Protected Attributes | |
| std::shared_ptr< Kakshya::SignalSourceContainer > | m_container |
| ExecutionContext | m_last_execution_context |
Private Member Functions | |
| void | validate_operation_data_types () const |
| Validate input/output types and warn about marker types. | |
| output_type | apply_hooks (const input_type &input, const ExecutionContext &context) |
Private Attributes | |
| std::vector< std::shared_ptr< ComputeOperation > > | m_dependencies |
Friends | |
| class | ComputeMatrix |
Base interface for all computational operations in the processing pipeline.
Defines the core contract for operations that transform data from one type to another. Operations can be parameterized, validated, and composed into complex processing networks.
| InputType | The data type accepted by this operation |
| OutputType | The data type produced by this operation, defaults to InputType |
Definition at line 25 of file ComputeOperation.hpp.