pub struct PolyBasisNtt { /* private fields */ }Expand description
LchNtt over BinaryField128, with the data held in the polynomial basis throughout.
A tower-basis product converts both operands into the polynomial basis and the result back,
sixteen dependent table lookups apiece, which is most of what a butterfly costs. Converting
the whole matrix once on the way in and once on the way out pays 2 conversions per element
instead of 3ℓ/2, and every twiddle multiply in between is a bare carryless multiply and a
reduction. Additions are XOR in both bases, so they are unaffected.
Without a carryless-multiply instruction that product is a bit-serial loop and slower than the tower arithmetic it replaces, so on such a target the transform runs in the tower basis instead, using typed subfield multiplication when the twiddle permits it. The choice is a constant and only one arm survives compilation.
Trait Implementations§
Source§impl AdditiveNtt<BinaryField128> for PolyBasisNtt
impl AdditiveNtt<BinaryField128> for PolyBasisNtt
Source§fn shifted_ntt_batch(
&self,
mat: RowMajorMatrix<BinaryField128>,
shift: BinaryField128,
) -> RowMajorMatrix<BinaryField128>
fn shifted_ntt_batch( &self, mat: RowMajorMatrix<BinaryField128>, shift: BinaryField128, ) -> RowMajorMatrix<BinaryField128>
shift + S_ℓ. Read moreSource§fn ntt_batch_padded(
&self,
mat: RowMajorMatrix<BinaryField128>,
log_inv_rate: usize,
) -> RowMajorMatrix<BinaryField128>
fn ntt_batch_padded( &self, mat: RowMajorMatrix<BinaryField128>, log_inv_rate: usize, ) -> RowMajorMatrix<BinaryField128>
Source§fn shifted_lde_batch(
&self,
mat: RowMajorMatrix<BinaryField128>,
added_bits: usize,
shift: BinaryField128,
) -> RowMajorMatrix<BinaryField128>
fn shifted_lde_batch( &self, mat: RowMajorMatrix<BinaryField128>, added_bits: usize, shift: BinaryField128, ) -> RowMajorMatrix<BinaryField128>
lde_batch on the coset shift + S_{ℓ + added_bits}.Source§fn shifted_intt_batch(
&self,
mat: RowMajorMatrix<BinaryField128>,
shift: BinaryField128,
) -> RowMajorMatrix<BinaryField128>
fn shifted_intt_batch( &self, mat: RowMajorMatrix<BinaryField128>, shift: BinaryField128, ) -> RowMajorMatrix<BinaryField128>
shifted_ntt_batch. Read moreSource§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§impl Clone for PolyBasisNtt
impl Clone for PolyBasisNtt
Source§impl Debug for PolyBasisNtt
impl Debug for PolyBasisNtt
Auto Trait Implementations§
impl Freeze for PolyBasisNtt
impl RefUnwindSafe for PolyBasisNtt
impl Send for PolyBasisNtt
impl Sync for PolyBasisNtt
impl Unpin for PolyBasisNtt
impl UnsafeUnpin for PolyBasisNtt
impl UnwindSafe for PolyBasisNtt
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