pub struct U32Add {
pub xin: Col<B1, 32>,
pub yin: Col<B1, 32>,
pub zout: Col<B1, 32>,
pub final_carry: Option<Col<B1>>,
pub flags: U32AddFlags,
/* private fields */
}
Expand description
A gadget for performing 32-bit integer addition on vertically-packed bit columns.
This gadget has input columns xin
and yin
for the two 32-bit integers to be added, and an
output column zout
, and it constrains that xin + yin = zout
as integers.
Fields§
§xin: Col<B1, 32>
§yin: Col<B1, 32>
§zout: Col<B1, 32>
The output column, either committed if flags.commit_zout
is set, otherwise a linear
combination derived column.
final_carry: Option<Col<B1>>
This is Some
if flags.expose_final_carry
is set, otherwise it is None
.
flags: U32AddFlags
Flags modifying the gadget’s behavior.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for U32Add
impl RefUnwindSafe for U32Add
impl Send for U32Add
impl Sync for U32Add
impl Unpin for U32Add
impl UnwindSafe for U32Add
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