pub struct RecursiveDft<F> { /* private fields */ }
Expand description
Recursive DFT, decimation-in-frequency in the forward direction, decimation-in-time in the backward (inverse) direction.
Implementations§
Source§impl<MP: FieldParameters + TwoAdicData> RecursiveDft<MontyField31<MP>>
impl<MP: FieldParameters + TwoAdicData> RecursiveDft<MontyField31<MP>>
Trait Implementations§
Source§impl<F: Clone> Clone for RecursiveDft<F>
impl<F: Clone> Clone for RecursiveDft<F>
Source§fn clone(&self) -> RecursiveDft<F>
fn clone(&self) -> RecursiveDft<F>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<F: Debug> Debug for RecursiveDft<F>
impl<F: Debug> Debug for RecursiveDft<F>
Source§impl<F: Default> Default for RecursiveDft<F>
impl<F: Default> Default for RecursiveDft<F>
Source§fn default() -> RecursiveDft<F>
fn default() -> RecursiveDft<F>
Source§impl<MP: MontyParameters + FieldParameters + TwoAdicData> TwoAdicSubgroupDft<MontyField31<MP>> for RecursiveDft<MontyField31<MP>>
impl<MP: MontyParameters + FieldParameters + TwoAdicData> TwoAdicSubgroupDft<MontyField31<MP>> for RecursiveDft<MontyField31<MP>>
DFT implementation that uses DIT for the inverse “backward” direction and DIF for the “forward” direction.
The API mandates that the LDE is applied column-wise on the row-major input. This is awkward for memory coherence, so the algorithm here transposes the input and operates on the rows in the typical way, then transposes back again for the output. Even for modestly large inputs, the cost of the two tranposes outweighed by the improved performance from operating row-wise.
The choice of DIT for inverse and DIF for “forward” transform mean that a (coset) LDE
- IDFT / zero extend / DFT
expands to
- bit-reverse input
- invDFT DIT
- result is in “correct” order
- coset shift and zero extend result
- DFT DIF on result
- output is bit-reversed, as required for FRI.
Hence the only bit-reversal that needs to take place is on the input.
type Evaluations = RowIndexMappedView<BitReversalPerm, DenseMatrix<MontyField31<MP>>>
Source§fn dft_batch(&self, mat: RowMajorMatrix<MontyField31<MP>>) -> Self::Evaluations
fn dft_batch(&self, mat: RowMajorMatrix<MontyField31<MP>>) -> Self::Evaluations
mat
.
This is the only method an implementer needs to define, all other
methods can be derived from this one.Source§fn idft_batch(
&self,
mat: RowMajorMatrix<MontyField31<MP>>,
) -> RowMajorMatrix<MontyField31<MP>>
fn idft_batch( &self, mat: RowMajorMatrix<MontyField31<MP>>, ) -> RowMajorMatrix<MontyField31<MP>>
mat
.Source§fn coset_lde_batch(
&self,
mat: RowMajorMatrix<MontyField31<MP>>,
added_bits: usize,
shift: MontyField31<MP>,
) -> Self::Evaluations
fn coset_lde_batch( &self, mat: RowMajorMatrix<MontyField31<MP>>, added_bits: usize, shift: MontyField31<MP>, ) -> Self::Evaluations
mat
onto a coset of a larger subgroup.Source§fn coset_dft(&self, vec: Vec<F>, shift: F) -> Vec<F>
fn coset_dft(&self, vec: Vec<F>, shift: F) -> Vec<F>
vec
. This can be viewed as interpolation onto a coset of a
multiplicative subgroup, rather than the subgroup itself.Source§fn coset_dft_batch(&self, mat: DenseMatrix<F>, shift: F) -> Self::Evaluations
fn coset_dft_batch(&self, mat: DenseMatrix<F>, shift: F) -> Self::Evaluations
mat
. This can be viewed as interpolation onto a
coset of a multiplicative subgroup, rather than the subgroup itself.Source§fn coset_idft(&self, vec: Vec<F>, shift: F) -> Vec<F>
fn coset_idft(&self, vec: Vec<F>, shift: F) -> Vec<F>
vec
. This can be viewed as an inverse operation of
“coset DFT”, that interpolates over a coset of a multiplicative subgroup, rather than
subgroup itself.Source§fn coset_idft_batch(&self, mat: DenseMatrix<F>, shift: F) -> DenseMatrix<F>
fn coset_idft_batch(&self, mat: DenseMatrix<F>, shift: F) -> DenseMatrix<F>
mat
. This can be viewed as an inverse operation
of “coset DFT”, that interpolates over a coset of a multiplicative subgroup, rather than the
subgroup itself.Source§fn lde(&self, vec: Vec<F>, added_bits: usize) -> Vec<F>
fn lde(&self, vec: Vec<F>, added_bits: usize) -> Vec<F>
vec
onto a larger subgroup.Source§fn lde_batch(&self, mat: DenseMatrix<F>, added_bits: usize) -> Self::Evaluations
fn lde_batch(&self, mat: DenseMatrix<F>, added_bits: usize) -> Self::Evaluations
mat
onto a larger subgroup.Auto Trait Implementations§
impl<F> !Freeze for RecursiveDft<F>
impl<F> !RefUnwindSafe for RecursiveDft<F>
impl<F> Send for RecursiveDft<F>where
F: Send,
impl<F> !Sync for RecursiveDft<F>
impl<F> Unpin for RecursiveDft<F>where
F: Unpin,
impl<F> UnwindSafe for RecursiveDft<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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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