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

◆ configure_execution_context()

void MayaFlux::Yantra::ComputeMatrix::configure_execution_context ( ExecutionContext ctx,
const std::type_index &  op_type 
)
inlineprivate

Configure execution context based on operation type and policy.

Definition at line 461 of file ComputeMatrix.hpp.

462 {
463 switch (m_execution_policy) {
466 ctx.mode = ExecutionMode::SYNC;
467 break;
469 ctx.mode = ExecutionMode::PARALLEL;
470 break;
471 }
472
473 ctx.timeout = m_default_timeout;
474
476 m_context_configurator(ctx, op_type);
477 }
478
479 // TODO: Add thread pool assignment, GPU context, etc.
480 }
std::function< void(ExecutionContext &, const std::type_index &)> m_context_configurator
std::chrono::milliseconds m_default_timeout
@ SYNC
Synchronous execution.
@ PARALLEL
Parallel with other operations.

References MayaFlux::Yantra::ExecutionContext::mode, and MayaFlux::Yantra::ExecutionContext::timeout.