MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ apply_operation_with_dependencies()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
output_type MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::apply_operation_with_dependencies ( const input_type input)
inline

Applies the operation with dependencies resolved.

Parameters
inputInput data to process
Returns
Processed output data

This method ensures that all dependencies are executed before applying the operation. It is intended for use in scenarios where the operation is part of a larger processing graph.

Note
: This method is for usage outside of ComputeMatrix, and will not work recursively. For ComputeMatrix, simply use a chain of operations.

Definition at line 62 of file ComputeOperation.hpp.

63 {
65
66 for (auto& dep : m_dependencies) {
67 if (dep->validate_input(input)) {
68 dep->apply_operation_internal(input, m_last_execution_context);
69 }
70 }
71
74 }
virtual output_type apply_operation_internal(const input_type &input, const ExecutionContext &context)
Internal execution method - ComputeMatrix can access this.
std::vector< std::shared_ptr< ComputeOperation > > m_dependencies
@ SYNC
Synchronous execution.
@ DEPENDENCY
Part of dependency graph.