MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / safe_impl

Function safe_impl

expander_compiler/src/hints/mod.rs:10–20  ·  view source on GitHub ↗
(
    hint_caller: &impl HintCaller<F>,
    hint_id: usize,
    inputs: &[F],
    num_outputs: usize,
)

Source from the content-addressed store, hash-verified

8use crate::{field::Field, utils::error::Error};
9
10pub fn safe_impl<F: Field>(
11 hint_caller: &impl HintCaller<F>,
12 hint_id: usize,
13 inputs: &[F],
14 num_outputs: usize,
15) -> Result<Vec<F>, Error> {
16 match BuiltinHintIds::from_usize(hint_id) {
17 Some(hint_id) => Ok(impl_builtin_hint(hint_id, inputs, num_outputs)),
18 None => hint_caller.call(hint_id, inputs, num_outputs),
19 }
20}

Callers 2

eval_safeMethod · 0.85
eval_sub_safe_simdMethod · 0.85

Calls 2

impl_builtin_hintFunction · 0.85
callMethod · 0.80

Tested by

no test coverage detected