pub struct DivSS32 {
pub p_in_bits: [Col<B1>; 32],
pub q_in_bits: [Col<B1>; 32],
pub out_div_bits: [Col<B1>; 32],
pub out_rem_bits: [Col<B1>; 32],
pub p_in: Col<B32>,
pub q_in: Col<B32>,
pub out_div: Col<B32>,
pub out_rem: Col<B32>,
/* private fields */
}
Expand description
Gadget for signed division of two i32s.
p = q*a + r
where p and r have the same sign bit.
Fields§
§p_in_bits: [Col<B1>; 32]
§q_in_bits: [Col<B1>; 32]
§out_div_bits: [Col<B1>; 32]
§out_rem_bits: [Col<B1>; 32]
§p_in: Col<B32>
§q_in: Col<B32>
§out_div: Col<B32>
§out_rem: Col<B32>
Implementations§
Source§impl DivSS32
impl DivSS32
pub fn new(table: &mut TableBuilder<'_>) -> Self
pub fn populate_with_inputs<P>( &self, index: &mut TableWitnessSegment<'_, P>, p_vals: impl IntoIterator<Item = B32>, q_vals: impl IntoIterator<Item = B32> + Clone, ) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DivSS32
impl RefUnwindSafe for DivSS32
impl Send for DivSS32
impl Sync for DivSS32
impl Unpin for DivSS32
impl UnwindSafe for DivSS32
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more