pub struct ChunkedEqTracker<P: PackedField> { /* private fields */ }Expand description
Equality-indicator state for one point, holding the expansion as an outer product.
A prover walking the hypercube in chunks reads the two factors at different rates:
expansion[s * chunk_len + c] = chunk[c] * suffix[s]
chunk read per element, so it should stay in cache
suffix read once per chunk, as a single scalarKeeping the per-element factor small is what lets it stay resident.
Implementations§
Source§impl<F: Field, P: PackedField<Scalar = F>> ChunkedEqTracker<P>
impl<F: Field, P: PackedField<Scalar = F>> ChunkedEqTracker<P>
Sourcepub fn new(max_chunk_vars: usize, eval_point: &[F]) -> Self
pub fn new(max_chunk_vars: usize, eval_point: &[F]) -> Self
Expands the indicator as two factors, for every coordinate bar the highest.
§Arguments
max_chunk_vars- Ceiling on the inner factor’s variable count.eval_point- The point the claim is weighted at.
Sourcepub fn next_coordinate(&self) -> F
pub fn next_coordinate(&self) -> F
Returns the coordinate of the variable the next round binds.
Sourcepub const fn chunk(&self) -> &FieldBuffer<P>
pub const fn chunk(&self) -> &FieldBuffer<P>
Returns the inner factor, indexed within one chunk.
Sourcepub const fn suffix(&self) -> &FieldBuffer<P>
pub const fn suffix(&self) -> &FieldBuffer<P>
Returns the outer factor, indexed by chunk.
Sourcepub fn interpolate2(
&self,
sum: F,
prime_evals: RoundEvals<F, 2>,
) -> (RoundCoeffs<F>, RoundCoeffs<F>)
pub fn interpolate2( &self, sum: F, prime_evals: RoundEvals<F, 2>, ) -> (RoundCoeffs<F>, RoundCoeffs<F>)
Interpolates a degree-2 round polynomial from its sampled evaluations.
§Arguments
sum- The claim this round’s polynomial must satisfy.prime_evals- Sampled evaluations, with the equality factors removed.
§Returns
- The polynomial without its equality factors, which the next claim reduces.
- The same polynomial carrying both factors, which goes on the wire.
Trait Implementations§
Source§impl<P: Clone + PackedField> Clone for ChunkedEqTracker<P>
impl<P: Clone + PackedField> Clone for ChunkedEqTracker<P>
Source§fn clone(&self) -> ChunkedEqTracker<P>
fn clone(&self) -> ChunkedEqTracker<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<P> Freeze for ChunkedEqTracker<P>
impl<P> RefUnwindSafe for ChunkedEqTracker<P>
impl<P> Send for ChunkedEqTracker<P>
impl<P> Sync for ChunkedEqTracker<P>
impl<P> Unpin for ChunkedEqTracker<P>
impl<P> UnsafeUnpin for ChunkedEqTracker<P>
impl<P> UnwindSafe for ChunkedEqTracker<P>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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