pub struct LchNtt<F> { /* private fields */ }Expand description
The Lin–Chung–Han additive NTT over the Cantor-basis domain.
Twiddles are index shifts (D8): at stage j and butterfly block blk the twiddle is
W_j(shift) + domain_point(blk << 1), so there is no twiddle table.
Consecutive blocks differ by a fixed increment, so a block takes its twiddle from the one
before it rather than walking its own index.
The ℓ - 1 increments are shared by every stage and are the only per-size precomputation.
W_j is F_2-linear and domain_point(0) is zero, so over the subspace itself — the
coset with shift = 0 — the first block of every stage has a zero twiddle and its
butterfly collapses to a single addition. The inner loop takes that as a separate case,
which removes one multiply in 2/ℓ of them.
At the wide stages a pair of rows is megabytes apart, so a stage alone costs a pass over memory. The schedule groups adjacent stages into row sets closed under all of them.
Trait Implementations§
Source§impl<F: ButterflyField> AdditiveNtt<F> for LchNtt<F>
impl<F: ButterflyField> AdditiveNtt<F> for LchNtt<F>
Source§fn shifted_ntt_batch(
&self,
mat: RowMajorMatrix<F>,
shift: F,
) -> RowMajorMatrix<F>
fn shifted_ntt_batch( &self, mat: RowMajorMatrix<F>, shift: F, ) -> RowMajorMatrix<F>
shift + S_ℓ. Read moreSource§fn shifted_intt_batch(
&self,
mat: RowMajorMatrix<F>,
shift: F,
) -> RowMajorMatrix<F>
fn shifted_intt_batch( &self, mat: RowMajorMatrix<F>, shift: F, ) -> RowMajorMatrix<F>
shifted_ntt_batch. Read moreSource§fn ntt_batch_padded(
&self,
mat: RowMajorMatrix<F>,
log_inv_rate: usize,
) -> RowMajorMatrix<F>
fn ntt_batch_padded( &self, mat: RowMajorMatrix<F>, log_inv_rate: usize, ) -> RowMajorMatrix<F>
Source§fn ntt_batch(&self, mat: RowMajorMatrix<F>) -> RowMajorMatrix<F>
fn ntt_batch(&self, mat: RowMajorMatrix<F>) -> RowMajorMatrix<F>
S_ℓ.Source§fn intt_batch(&self, mat: RowMajorMatrix<F>) -> RowMajorMatrix<F>
fn intt_batch(&self, mat: RowMajorMatrix<F>) -> RowMajorMatrix<F>
ntt_batch.Source§fn lde_batch(
&self,
mat: RowMajorMatrix<F>,
added_bits: usize,
) -> RowMajorMatrix<F>
fn lde_batch( &self, mat: RowMajorMatrix<F>, added_bits: usize, ) -> RowMajorMatrix<F>
S_{ℓ + added_bits} ⊃ S_ℓ. Read moreSource§fn shifted_lde_batch(
&self,
mat: RowMajorMatrix<F>,
added_bits: usize,
shift: F,
) -> RowMajorMatrix<F>
fn shifted_lde_batch( &self, mat: RowMajorMatrix<F>, added_bits: usize, shift: F, ) -> RowMajorMatrix<F>
lde_batch on the coset shift + S_{ℓ + added_bits}.Auto Trait Implementations§
impl<F> Freeze for LchNtt<F>where
PhantomData<F>: Freeze,
impl<F> RefUnwindSafe for LchNtt<F>where
PhantomData<F>: RefUnwindSafe,
impl<F> Send for LchNtt<F>where
PhantomData<F>: Send,
impl<F> Sync for LchNtt<F>where
PhantomData<F>: Sync,
impl<F> Unpin for LchNtt<F>where
PhantomData<F>: Unpin,
impl<F> UnsafeUnpin for LchNtt<F>where
PhantomData<F>: UnsafeUnpin,
impl<F> UnwindSafe for LchNtt<F>where
PhantomData<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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