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

◆ with_gpu_backend()

RuleBuilder & MayaFlux::Yantra::ComputationGrammar::RuleBuilder::with_gpu_backend ( Portal::Graphics::ShaderSpec  spec)
inline

Attach a ShaderSpec GPU backend to this rule.

When set, the executor wrapper builds a ShaderExecutionContext from the spec via config_from_spec() and bindings_from_spec() and calls set_gpu_backend() on the operation before dispatching. Falls back to the CPU executor if shader compilation fails.

Must be called before executes() to take effect, as executes() reads the stored spec when wrapping the user lambda.

Parameters
specShaderSpec produced by ShaderSpec::Assemble::build().

Definition at line 485 of file ComputeGrammar.hpp.

486 {
487 m_rule.gpu_spec = std::move(spec);
488 return *this;
489 }
std::optional< Portal::Graphics::ShaderSpec > gpu_spec
When set, executor receives a GPU-backed operation.

References MayaFlux::Yantra::ComputationGrammar::Rule::gpu_spec.