Function naga::proc::constant_evaluator::component_wise_concrete_int
source · fn component_wise_concrete_int<const N: usize, const M: usize, F>(
eval: &mut ConstantEvaluator<'_>,
span: Span,
exprs: [Handle<Expression>; N],
handler: F,
) -> Result<Handle<Expression>, ConstantEvaluatorError>where
ConcreteInt<M>: Into<Expression>,
F: FnMut(ConcreteInt<N>) -> Result<ConcreteInt<M>, ConstantEvaluatorError> + Clone,
Expand description
Attempts to evaluate multiple exprs
as a combined ConcreteInt
to pass to handler
.
If exprs
are vectors of the same length, handler
is called for each corresponding
component of each vector.
handler
’s output is registered as a new expression. If exprs
are vectors of the
same length, a new vector expression is registered, composed of each component emitted
by handler
.