pub struct XorLookupChip<const M: usize> {
pub air: XorLookupAir<M>,
pub count: Vec<Vec<AtomicU32>>,
}
Expand description
This chip gets requests to compute the xor of two numbers x and y of at most M bits. It generates a preprocessed table with a row for each possible triple (x, y, x^y) and keeps count of the number of times each triple is requested for the single main trace column.
Fields§
§air: XorLookupAir<M>
§count: Vec<Vec<AtomicU32>>
Implementations§
Trait Implementations§
Source§impl<SC: StarkGenericConfig, const M: usize> Chip<SC> for XorLookupChip<M>
impl<SC: StarkGenericConfig, const M: usize> Chip<SC> for XorLookupChip<M>
fn air(&self) -> Arc<dyn AnyRap<SC>>
Source§fn generate_air_proof_input(self) -> AirProofInput<SC>
fn generate_air_proof_input(self) -> AirProofInput<SC>
Generate all necessary input for proving a single AIR.
fn generate_air_proof_input_with_id( self, air_id: usize, ) -> (usize, AirProofInput<SC>)
Source§impl<const M: usize> ChipUsageGetter for XorLookupChip<M>
impl<const M: usize> ChipUsageGetter for XorLookupChip<M>
fn air_name(&self) -> String
Source§fn current_trace_height(&self) -> usize
fn current_trace_height(&self) -> usize
Height of used rows in the main trace.
Source§fn trace_width(&self) -> usize
fn trace_width(&self) -> usize
Width of the main trace
Source§fn constant_trace_height(&self) -> Option<usize>
fn constant_trace_height(&self) -> Option<usize>
If the chip has a state-independent trace height that is determined
upon construction, return this height. This is used to distinguish
“static” versus “dynamic” usage metrics.
Source§fn current_trace_cells(&self) -> usize
fn current_trace_cells(&self) -> usize
For metrics collection
Auto Trait Implementations§
impl<const M: usize> Freeze for XorLookupChip<M>
impl<const M: usize> RefUnwindSafe for XorLookupChip<M>
impl<const M: usize> Send for XorLookupChip<M>
impl<const M: usize> Sync for XorLookupChip<M>
impl<const M: usize> Unpin for XorLookupChip<M>
impl<const M: usize> UnwindSafe for XorLookupChip<M>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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