MayaFlux 0.4.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 522 of file ComputeMatrix.hpp.

523 {
524 switch (m_execution_policy) {
527 ctx.mode = ExecutionMode::SYNC;
528 break;
530 ctx.mode = ExecutionMode::PARALLEL;
531 break;
532 }
533
534 ctx.timeout = m_default_timeout;
535
537 m_context_configurator(ctx, op_type);
538 }
539
540 // TODO: Add thread pool assignment, GPU context, etc.
541 }
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.