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

◆ apply_hooks()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
output_type MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::apply_hooks ( const input_type input,
const ExecutionContext context 
)
inlineprotected

Definition at line 291 of file ComputeOperation.hpp.

292 {
293 if (context.pre_execution_hook) {
294 std::any input_any = const_cast<input_type&>(input);
295 context.pre_execution_hook(input_any);
296 }
297
298 auto result = operation_function(input);
299
300 if (context.post_execution_hook) {
301 std::any result_any = &result;
302 context.post_execution_hook(result_any);
303 }
304 return result;
305 }
Core::GlobalInputConfig input
Definition Config.cpp:36
virtual output_type operation_function(const input_type &input)=0
Executes the computational transformation on the input data.

References input, MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::operation_function(), MayaFlux::Yantra::ExecutionContext::post_execution_hook, and MayaFlux::Yantra::ExecutionContext::pre_execution_hook.

Referenced by MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::apply_operation_async(), MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::apply_operation_chained(), MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::apply_operation_internal(), and MayaFlux::Yantra::ComputeOperation< InputType, OutputType >::apply_operation_parallel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: