MayaFlux 1.0.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 526 of file ComputeMatrix.hpp.

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