Skip to main content

eval_arith_expr

Function eval_arith_expr 

Source
pub fn eval_arith_expr(
    expr: &str,
    config: &Config,
    extra: &BTreeMap<String, u64>,
) -> Result<u64, SpaceError>
Expand description

Evaluate a comparison-free arithmetic expression against a candidate’s dimensions plus extra named variables (bench plans use this for grid shapes and buffer sizes, e.g. elements / block_x).