openvm_native_recursion::utils

Function cond_eval

Source
pub fn cond_eval<C: Config, V: MemVariable<C, Expression: Clone> + CanSelect<C>>(
    builder: &mut Builder<C>,
    cond: Var<C::N>,
    v1: impl Into<V::Expression>,
    v2: impl Into<V::Expression>,
) -> [V; 2]
Expand description

Eval two expressions, return in the reversed order if cond == 1. Otherwise, return in the original order. This is a helper function for optimal performance.