pub struct AdditiveFft<F> { /* private fields */ }Expand description
In-place additive FFT over a 2^log_n subspace of a binary
tower field. Transforms return Err(FftError::BadLength)
unless data.len() == 2^log_n; on success the buffer
is overwritten in place.
Implementations§
Source§impl<F: BinaryFieldExtras + HardwareField> AdditiveFft<F>
impl<F: BinaryFieldExtras + HardwareField> AdditiveFft<F>
Sourcepub fn new(log_n: u32) -> Self
pub fn new(log_n: u32) -> Self
Derives the Cantor basis (via solve_quadratic) and the twiddle schedule for transform size 2^log_n. This one-time allocation is the only heap use; the transforms are in-place.
§Panics
If log_n is not in 1..=min(F::BITS, 63), or F admits no Cantor basis of that size.
Sourcepub fn forward_scalar(&self, data: &mut [Flat<F>]) -> Result<(), FftError>
pub fn forward_scalar(&self, data: &mut [Flat<F>]) -> Result<(), FftError>
Forward: novel-basis coefficients to evaluations.
Sourcepub fn inverse_scalar(&self, data: &mut [Flat<F>]) -> Result<(), FftError>
pub fn inverse_scalar(&self, data: &mut [Flat<F>]) -> Result<(), FftError>
Inverse: evaluations to novel-basis coefficients.
Sourcepub fn forward_coset_scalar(
&self,
data: &mut [Flat<F>],
offset: Flat<F>,
) -> Result<(), FftError>
pub fn forward_coset_scalar( &self, data: &mut [Flat<F>], offset: Flat<F>, ) -> Result<(), FftError>
Forward over the coset offset + W_log_n.
Sourcepub fn inverse_coset_scalar(
&self,
data: &mut [Flat<F>],
offset: Flat<F>,
) -> Result<(), FftError>
pub fn inverse_coset_scalar( &self, data: &mut [Flat<F>], offset: Flat<F>, ) -> Result<(), FftError>
Inverse over the coset offset + W_log_n.
Sourcepub fn forward(&self, data: &mut [PackedFlat<F>]) -> Result<(), FftError>
pub fn forward(&self, data: &mut [PackedFlat<F>]) -> Result<(), FftError>
Forward, F::WIDTH column-lanes per element in lockstep.
Sourcepub fn inverse(&self, data: &mut [PackedFlat<F>]) -> Result<(), FftError>
pub fn inverse(&self, data: &mut [PackedFlat<F>]) -> Result<(), FftError>
Inverse, F::WIDTH column-lanes per element in lockstep.
Sourcepub fn forward_coset(
&self,
data: &mut [PackedFlat<F>],
offset: Flat<F>,
) -> Result<(), FftError>
pub fn forward_coset( &self, data: &mut [PackedFlat<F>], offset: Flat<F>, ) -> Result<(), FftError>
Packed forward over the coset offset + W_log_n.
Sourcepub fn inverse_coset(
&self,
data: &mut [PackedFlat<F>],
offset: Flat<F>,
) -> Result<(), FftError>
pub fn inverse_coset( &self, data: &mut [PackedFlat<F>], offset: Flat<F>, ) -> Result<(), FftError>
Packed inverse over the coset offset + W_log_n.
Auto Trait Implementations§
impl<F> Freeze for AdditiveFft<F>
impl<F> RefUnwindSafe for AdditiveFft<F>where
F: RefUnwindSafe,
impl<F> Send for AdditiveFft<F>where
F: Send,
impl<F> Sync for AdditiveFft<F>where
F: Sync,
impl<F> Unpin for AdditiveFft<F>
impl<F> UnsafeUnpin for AdditiveFft<F>
impl<F> UnwindSafe for AdditiveFft<F>where
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> 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