pub trait BabyBearInst: GateInst {
Show 17 methods
// Required methods
fn bb_load_constant(&mut self, value: BabyBear) -> BabyBearWire<Self::F>;
fn bb_load_reduced_constant(
&mut self,
value: BabyBear,
) -> ReducedBabyBearWire<Self::F>;
fn bb_reduce(&mut self, a: BabyBearWire<Self::F>) -> BabyBearWire<Self::F>;
fn bb_reduce_max_bits(
&mut self,
a: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>;
fn bb_add(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>;
fn bb_neg(&mut self, a: BabyBearWire<Self::F>) -> BabyBearWire<Self::F>;
fn bb_sub(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>;
fn bb_mul(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>;
fn bb_mul_add(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
c: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>;
fn bb_div(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>;
fn bb_assert_zero(&mut self, a: BabyBearWire<Self::F>);
fn bb_assert_equal(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
);
fn bb_zero(&mut self) -> BabyBearWire<Self::F>;
fn bb_one(&mut self) -> BabyBearWire<Self::F>;
fn bb_mul_const(
&mut self,
a: BabyBearWire<Self::F>,
c: BabyBear,
) -> BabyBearWire<Self::F>;
fn bb_square(&mut self, a: BabyBearWire<Self::F>) -> BabyBearWire<Self::F>;
fn bb_pow_power_of_two(
&mut self,
a: BabyBearWire<Self::F>,
n: usize,
) -> BabyBearWire<Self::F>;
}Expand description
BabyBear base-field operations mirroring BabyBearChip.
Required Methods§
fn bb_load_constant(&mut self, value: BabyBear) -> BabyBearWire<Self::F>
fn bb_load_reduced_constant( &mut self, value: BabyBear, ) -> ReducedBabyBearWire<Self::F>
fn bb_reduce(&mut self, a: BabyBearWire<Self::F>) -> BabyBearWire<Self::F>
fn bb_reduce_max_bits( &mut self, a: BabyBearWire<Self::F>, ) -> BabyBearWire<Self::F>
fn bb_add( &mut self, a: BabyBearWire<Self::F>, b: BabyBearWire<Self::F>, ) -> BabyBearWire<Self::F>
fn bb_neg(&mut self, a: BabyBearWire<Self::F>) -> BabyBearWire<Self::F>
fn bb_sub( &mut self, a: BabyBearWire<Self::F>, b: BabyBearWire<Self::F>, ) -> BabyBearWire<Self::F>
fn bb_mul( &mut self, a: BabyBearWire<Self::F>, b: BabyBearWire<Self::F>, ) -> BabyBearWire<Self::F>
Sourcefn bb_mul_add(
&mut self,
a: BabyBearWire<Self::F>,
b: BabyBearWire<Self::F>,
c: BabyBearWire<Self::F>,
) -> BabyBearWire<Self::F>
fn bb_mul_add( &mut self, a: BabyBearWire<Self::F>, b: BabyBearWire<Self::F>, c: BabyBearWire<Self::F>, ) -> BabyBearWire<Self::F>
a * b + c
fn bb_div( &mut self, a: BabyBearWire<Self::F>, b: BabyBearWire<Self::F>, ) -> BabyBearWire<Self::F>
fn bb_assert_zero(&mut self, a: BabyBearWire<Self::F>)
fn bb_assert_equal( &mut self, a: BabyBearWire<Self::F>, b: BabyBearWire<Self::F>, )
fn bb_zero(&mut self) -> BabyBearWire<Self::F>
fn bb_one(&mut self) -> BabyBearWire<Self::F>
fn bb_mul_const( &mut self, a: BabyBearWire<Self::F>, c: BabyBear, ) -> BabyBearWire<Self::F>
fn bb_square(&mut self, a: BabyBearWire<Self::F>) -> BabyBearWire<Self::F>
Sourcefn bb_pow_power_of_two(
&mut self,
a: BabyBearWire<Self::F>,
n: usize,
) -> BabyBearWire<Self::F>
fn bb_pow_power_of_two( &mut self, a: BabyBearWire<Self::F>, n: usize, ) -> BabyBearWire<Self::F>
a^(2^n)