pub struct Chip<F: Field, A> { /* private fields */ }Expand description
An Air that encodes lookups based on interactions.
Implementations§
source§impl<F: Field, A> Chip<F, A>
impl<F: Field, A> Chip<F, A>
sourcepub fn sends(&self) -> &[Interaction<F>]
pub fn sends(&self) -> &[Interaction<F>]
The send interactions of the chip.
sourcepub fn receives(&self) -> &[Interaction<F>]
pub fn receives(&self) -> &[Interaction<F>]
The receive interactions of the chip.
sourcepub const fn log_quotient_degree(&self) -> usize
pub const fn log_quotient_degree(&self) -> usize
The relative log degree of the quotient polynomial, i.e. log2(max_constraint_degree - 1).
source§impl<F: PrimeField32, A: MachineAir<F>> Chip<F, A>
impl<F: PrimeField32, A: MachineAir<F>> Chip<F, A>
source§impl<F, A> Chip<F, A>where
F: Field,
impl<F, A> Chip<F, A>where
F: Field,
sourcepub fn new(air: A) -> Self
pub fn new(air: A) -> Self
Records the interactions and constraint degree from the air and crates a new chip.
pub fn num_interactions(&self) -> usize
pub fn num_sends_by_kind(&self, kind: InteractionKind) -> usize
pub fn num_receives_by_kind(&self, kind: InteractionKind) -> usize
pub fn generate_permutation_trace<EF: ExtensionField<F>>(
&self,
preprocessed: Option<&RowMajorMatrix<F>>,
main: &RowMajorMatrix<F>,
random_elements: &[EF],
) -> RowMajorMatrix<EF>where
F: PrimeField,
pub fn permutation_width(&self) -> usize
pub const fn quotient_width(&self) -> usize
pub const fn logup_batch_size(&self) -> usize
Trait Implementations§
source§impl<F, A> BaseAir<F> for Chip<F, A>
impl<F, A> BaseAir<F> for Chip<F, A>
fn preprocessed_trace(&self) -> Option<RowMajorMatrix<F>>
source§impl<F, A> MachineAir<F> for Chip<F, A>where
F: Field,
A: MachineAir<F>,
impl<F, A> MachineAir<F> for Chip<F, A>where
F: Field,
A: MachineAir<F>,
§type Record = <A as MachineAir<F>>::Record
type Record = <A as MachineAir<F>>::Record
The execution record containing events for producing the air trace.
type Program = <A as MachineAir<F>>::Program
source§fn preprocessed_width(&self) -> usize
fn preprocessed_width(&self) -> usize
The width of the preprocessed trace.
source§fn generate_preprocessed_trace(
&self,
program: &A::Program,
) -> Option<RowMajorMatrix<F>>
fn generate_preprocessed_trace( &self, program: &A::Program, ) -> Option<RowMajorMatrix<F>>
Generate the preprocessed trace given a specific program.
source§fn generate_trace(
&self,
input: &A::Record,
output: &mut A::Record,
) -> RowMajorMatrix<F>
fn generate_trace( &self, input: &A::Record, output: &mut A::Record, ) -> RowMajorMatrix<F>
Generate the trace for a given execution record. Read more
source§fn generate_dependencies(&self, input: &A::Record, output: &mut A::Record)
fn generate_dependencies(&self, input: &A::Record, output: &mut A::Record)
Generate the dependencies for a given execution record.
source§impl<F, A> PartialEq for Chip<F, A>
impl<F, A> PartialEq for Chip<F, A>
impl<F, A: Eq> Eq for Chip<F, A>
Auto Trait Implementations§
impl<F, A> Freeze for Chip<F, A>where
A: Freeze,
impl<F, A> RefUnwindSafe for Chip<F, A>where
A: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, A> Send for Chip<F, A>where
A: Send,
impl<F, A> Sync for Chip<F, A>where
A: Sync,
impl<F, A> Unpin for Chip<F, A>
impl<F, A> UnwindSafe for Chip<F, A>where
A: UnwindSafe,
F: UnwindSafe,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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