pub struct RoundEvals<T, const D: usize>(pub [T; D]);Expand description
The D sampled evaluations of one claim’s round polynomial.
A degree-D polynomial needs D + 1 values.
The round claim supplies the one at 0, so only D are sampled:
D = 1 [ R(1) ]
D = 2 [ R(1), R(inf) ]Invariant: slot 0 is R(1), which every recovery of R(0) reads.
R(inf) is the leading coefficient, at one addition per element.
Any finite node past 1 would cost a full extrapolation.
T narrows as the round advances:
accumulate wide, unreduced
reduce packed
sum_scalars scalarTuple Fields§
§0: [T; D]Implementations§
Source§impl<T, const D: usize> RoundEvals<T, D>
impl<T, const D: usize> RoundEvals<T, D>
Sourcepub fn from_slots(slots: &[T]) -> Selfwhere
T: Copy,
pub fn from_slots(slots: &[T]) -> Selfwhere
T: Copy,
Reads one evaluator’s run of accumulator slots.
§Panics
Panics unless the run holds exactly D slots.
A mismatch means the evaluator’s reported degree disagrees with the D its body uses.
Sourcepub fn add_to(self, slots: &mut [T])where
T: AddAssign,
pub fn add_to(self, slots: &mut [T])where
T: AddAssign,
Adds these evaluations into one evaluator’s run of accumulator slots.
An evaluator sums into locals through its hot loop, then calls this once per chunk. The running sums therefore stay in registers, not in the shared accumulator buffer.
§Panics
Panics unless the run holds exactly D slots, as in Self::from_slots.
Sourcepub fn reduce<P: PackedField + WideMul<Output = T>>(self) -> RoundEvals<P, D>
pub fn reduce<P: PackedField + WideMul<Output = T>>(self) -> RoundEvals<P, D>
Reduces every wide slot, once the round’s accumulation is complete.
Accumulation sums unreduced products. So the modular reduction is paid once per round, not once per hypercube element.
Source§impl<P: PackedField, const D: usize> RoundEvals<P, D>
impl<P: PackedField, const D: usize> RoundEvals<P, D>
Sourcepub fn sum_scalars(self, n_vars: usize) -> RoundEvals<P::Scalar, D>
pub fn sum_scalars(self, n_vars: usize) -> RoundEvals<P::Scalar, D>
Sums the packed lanes of every slot into a scalar.
A round narrower than one packed word leaves the trailing lanes dead.
So only the first 2^n_vars are summed.
Source§impl<F: Field> RoundEvals<F, 1>
impl<F: Field> RoundEvals<F, 1>
Sourcepub fn interpolate_eq(self, claim: F, alpha: F) -> RoundCoeffs<F>
pub fn interpolate_eq(self, claim: F, alpha: F) -> RoundCoeffs<F>
Interpolates the prime round polynomial of an MLE-check.
§Arguments
claim- This round’s claim on the prime polynomial.alpha- The coordinate of the evaluation point that this round binds.
Source§impl<F: Field> RoundEvals<F, 2>
impl<F: Field> RoundEvals<F, 2>
Sourcepub fn interpolate(self, claim: F) -> RoundCoeffs<F>
pub fn interpolate(self, claim: F) -> RoundCoeffs<F>
Sourcepub fn interpolate_eq(self, claim: F, alpha: F) -> RoundCoeffs<F>
pub fn interpolate_eq(self, claim: F, alpha: F) -> RoundCoeffs<F>
Interpolates the prime round polynomial of an MLE-check.
§Arguments
claim- This round’s claim on the prime polynomial.alpha- The coordinate of the evaluation point that this round binds.
Trait Implementations§
Source§impl<T: AddAssign + Copy, const D: usize> Add<&RoundEvals<T, D>> for RoundEvals<T, D>
impl<T: AddAssign + Copy, const D: usize> Add<&RoundEvals<T, D>> for RoundEvals<T, D>
Source§impl<T: AddAssign + Copy, const D: usize> AddAssign<&RoundEvals<T, D>> for RoundEvals<T, D>
impl<T: AddAssign + Copy, const D: usize> AddAssign<&RoundEvals<T, D>> for RoundEvals<T, D>
Source§fn add_assign(&mut self, rhs: &Self)
fn add_assign(&mut self, rhs: &Self)
+= operation. Read moreSource§impl<T: Clone, const D: usize> Clone for RoundEvals<T, D>
impl<T: Clone, const D: usize> Clone for RoundEvals<T, D>
Source§fn clone(&self) -> RoundEvals<T, D>
fn clone(&self) -> RoundEvals<T, D>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<T: Copy, const D: usize> Copy for RoundEvals<T, D>
Auto Trait Implementations§
impl<T, const D: usize> Freeze for RoundEvals<T, D>where
T: Freeze,
impl<T, const D: usize> RefUnwindSafe for RoundEvals<T, D>where
T: RefUnwindSafe,
impl<T, const D: usize> Send for RoundEvals<T, D>where
T: Send,
impl<T, const D: usize> Sync for RoundEvals<T, D>where
T: Sync,
impl<T, const D: usize> Unpin for RoundEvals<T, D>where
T: Unpin,
impl<T, const D: usize> UnsafeUnpin for RoundEvals<T, D>where
T: UnsafeUnpin,
impl<T, const D: usize> UnwindSafe for RoundEvals<T, D>where
T: 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
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> ⓘ
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> ⓘ
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