MayaFlux 0.5.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 287 of file ComputeOperation.hpp.

288 {
289 if (context.pre_execution_hook) {
290 std::any input_any = const_cast<input_type&>(input);
291 context.pre_execution_hook(input_any);
292 }
293
294 auto result = operation_function(input);
295
296 if (context.post_execution_hook) {
297 std::any result_any = &result;
298 context.post_execution_hook(result_any);
299 }
300 return result;
301 }
Core::GlobalInputConfig input
Definition Config.cpp:38
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: