Trait sp1_recursion_circuit_v2::CircuitConfig

source ·
pub trait CircuitConfig: Config {
    type Bit: Clone + Variable<Self>;

    // Required methods
    fn read_bit(builder: &mut Builder<Self>) -> Self::Bit;
    fn read_felt(builder: &mut Builder<Self>) -> Felt<Self::F>;
    fn read_ext(builder: &mut Builder<Self>) -> Ext<Self::F, Self::EF>;
    fn ext2felt(
        builder: &mut Builder<Self>,
        ext: Ext<<Self as Config>::F, <Self as Config>::EF>,
    ) -> [Felt<<Self as Config>::F>; 4];
    fn exp_reverse_bits(
        builder: &mut Builder<Self>,
        input: Felt<<Self as Config>::F>,
        power_bits: Vec<Self::Bit>,
    ) -> Felt<<Self as Config>::F>;
    fn num2bits(
        builder: &mut Builder<Self>,
        num: Felt<<Self as Config>::F>,
        num_bits: usize,
    ) -> Vec<Self::Bit>;
    fn bits2num(
        builder: &mut Builder<Self>,
        bits: impl IntoIterator<Item = Self::Bit>,
    ) -> Felt<<Self as Config>::F>;
    fn select_chain_ef(
        builder: &mut Builder<Self>,
        should_swap: Self::Bit,
        first: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone,
        second: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone,
    ) -> Vec<Ext<<Self as Config>::F, <Self as Config>::EF>>;
}

Required Associated Types§

source

type Bit: Clone + Variable<Self>

Required Methods§

source

fn read_bit(builder: &mut Builder<Self>) -> Self::Bit

source

fn read_felt(builder: &mut Builder<Self>) -> Felt<Self::F>

source

fn read_ext(builder: &mut Builder<Self>) -> Ext<Self::F, Self::EF>

source

fn ext2felt( builder: &mut Builder<Self>, ext: Ext<<Self as Config>::F, <Self as Config>::EF>, ) -> [Felt<<Self as Config>::F>; 4]

source

fn exp_reverse_bits( builder: &mut Builder<Self>, input: Felt<<Self as Config>::F>, power_bits: Vec<Self::Bit>, ) -> Felt<<Self as Config>::F>

source

fn num2bits( builder: &mut Builder<Self>, num: Felt<<Self as Config>::F>, num_bits: usize, ) -> Vec<Self::Bit>

source

fn bits2num( builder: &mut Builder<Self>, bits: impl IntoIterator<Item = Self::Bit>, ) -> Felt<<Self as Config>::F>

source

fn select_chain_ef( builder: &mut Builder<Self>, should_swap: Self::Bit, first: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, second: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, ) -> Vec<Ext<<Self as Config>::F, <Self as Config>::EF>>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl CircuitConfig for OuterConfig

source§

type Bit = Var<<OuterConfig as Config>::N>

source§

fn read_bit(builder: &mut Builder<Self>) -> Self::Bit

source§

fn read_felt(builder: &mut Builder<Self>) -> Felt<Self::F>

source§

fn read_ext(builder: &mut Builder<Self>) -> Ext<Self::F, Self::EF>

source§

fn ext2felt( builder: &mut Builder<Self>, ext: Ext<<Self as Config>::F, <Self as Config>::EF>, ) -> [Felt<<Self as Config>::F>; 4]

source§

fn exp_reverse_bits( builder: &mut Builder<Self>, input: Felt<<Self as Config>::F>, power_bits: Vec<Var<<Self as Config>::N>>, ) -> Felt<<Self as Config>::F>

source§

fn num2bits( builder: &mut Builder<Self>, num: Felt<<Self as Config>::F>, num_bits: usize, ) -> Vec<Var<<Self as Config>::N>>

source§

fn bits2num( builder: &mut Builder<Self>, bits: impl IntoIterator<Item = Var<<Self as Config>::N>>, ) -> Felt<<Self as Config>::F>

source§

fn select_chain_ef( builder: &mut Builder<Self>, should_swap: Self::Bit, first: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, second: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, ) -> Vec<Ext<<Self as Config>::F, <Self as Config>::EF>>

source§

impl CircuitConfig for InnerConfig

source§

type Bit = Felt<<AsmConfig<BabyBear, BinomialExtensionField<BabyBear, 4>> as Config>::F>

source§

fn read_bit(builder: &mut Builder<Self>) -> Self::Bit

source§

fn read_felt(builder: &mut Builder<Self>) -> Felt<Self::F>

source§

fn read_ext(builder: &mut Builder<Self>) -> Ext<Self::F, Self::EF>

source§

fn ext2felt( builder: &mut Builder<Self>, ext: Ext<<Self as Config>::F, <Self as Config>::EF>, ) -> [Felt<<Self as Config>::F>; 4]

source§

fn exp_reverse_bits( builder: &mut Builder<Self>, input: Felt<<Self as Config>::F>, power_bits: Vec<Felt<<Self as Config>::F>>, ) -> Felt<<Self as Config>::F>

source§

fn num2bits( builder: &mut Builder<Self>, num: Felt<<Self as Config>::F>, num_bits: usize, ) -> Vec<Felt<<Self as Config>::F>>

source§

fn bits2num( builder: &mut Builder<Self>, bits: impl IntoIterator<Item = Felt<<Self as Config>::F>>, ) -> Felt<<Self as Config>::F>

source§

fn select_chain_ef( builder: &mut Builder<Self>, should_swap: Self::Bit, first: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, second: impl IntoIterator<Item = Ext<<Self as Config>::F, <Self as Config>::EF>> + Clone, ) -> Vec<Ext<<Self as Config>::F, <Self as Config>::EF>>

Implementors§