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>>
DFT implementation that uses DIT for the inverse “backward”
direction and DIF for the “forward” direction.
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 transposes 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.
Source§type Evaluations = RowIndexMappedView<BitReversalPerm, DenseMatrix<MontyField31<MP>>>
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. Read moreSource§fn idft_batch(
&self,
mat: RowMajorMatrix<MontyField31<MP>>,
) -> RowMajorMatrix<MontyField31<MP>>
fn idft_batch( &self, mat: RowMajorMatrix<MontyField31<MP>>, ) -> RowMajorMatrix<MontyField31<MP>>
mat. Read moreSource§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. Read moreSource§fn dft(&self, vec: Vec<F>) -> Vec<F>
fn dft(&self, vec: Vec<F>) -> Vec<F>
vec. Read moreSource§fn coset_dft(&self, vec: Vec<F>, shift: F) -> Vec<F>
fn coset_dft(&self, vec: Vec<F>, shift: F) -> Vec<F>
vec. Read moreSource§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. Read moreSource§fn coset_idft(&self, vec: Vec<F>, shift: F) -> Vec<F>
fn coset_idft(&self, vec: Vec<F>, shift: F) -> Vec<F>
vec. This is the inverse operation of “coset DFT”. Read moreSource§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 is the inverse operation
of “coset DFT”. Read moreSource§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. Read moreSource§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. Read moreSource§fn coset_lde(&self, vec: Vec<F>, added_bits: usize, shift: F) -> Vec<F>
fn coset_lde(&self, vec: Vec<F>, added_bits: usize, shift: F) -> Vec<F>
vec onto a coset of a larger subgroup. Read moreSource§fn dft_algebra<V>(&self, vec: Vec<V>) -> Vec<V>
fn dft_algebra<V>(&self, vec: Vec<V>) -> Vec<V>
vec. Read moreSource§fn dft_algebra_batch<V>(&self, mat: DenseMatrix<V>) -> DenseMatrix<V>
fn dft_algebra_batch<V>(&self, mat: DenseMatrix<V>) -> DenseMatrix<V>
mat. Read moreSource§fn coset_dft_algebra<V>(&self, vec: Vec<V>, shift: F) -> Vec<V>
fn coset_dft_algebra<V>(&self, vec: Vec<V>, shift: F) -> Vec<V>
vec. Read moreSource§fn coset_dft_algebra_batch<V>(
&self,
mat: DenseMatrix<V>,
shift: F,
) -> DenseMatrix<V>
fn coset_dft_algebra_batch<V>( &self, mat: DenseMatrix<V>, shift: F, ) -> DenseMatrix<V>
mat. Read moreSource§fn idft_algebra_batch<V>(&self, mat: DenseMatrix<V>) -> DenseMatrix<V>
fn idft_algebra_batch<V>(&self, mat: DenseMatrix<V>) -> DenseMatrix<V>
mat. Read moreSource§fn coset_idft_algebra<V>(&self, vec: Vec<V>, shift: F) -> Vec<V>
fn coset_idft_algebra<V>(&self, vec: Vec<V>, shift: F) -> Vec<V>
vec. This is the inverse operation of “coset DFT”. Read moreSource§fn coset_idft_algebra_batch<V>(
&self,
mat: DenseMatrix<V>,
shift: F,
) -> DenseMatrix<V>
fn coset_idft_algebra_batch<V>( &self, mat: DenseMatrix<V>, shift: F, ) -> DenseMatrix<V>
mat. This is the inverse operation
of “coset DFT”. Read moreSource§fn lde_algebra<V>(&self, vec: Vec<V>, added_bits: usize) -> Vec<V>
fn lde_algebra<V>(&self, vec: Vec<V>, added_bits: usize) -> Vec<V>
vec onto a larger subgroup. Read moreSource§fn lde_algebra_batch<V>(
&self,
mat: DenseMatrix<V>,
added_bits: usize,
) -> DenseMatrix<V>
fn lde_algebra_batch<V>( &self, mat: DenseMatrix<V>, added_bits: usize, ) -> DenseMatrix<V>
mat onto a larger subgroup. Read moreSource§fn coset_lde_algebra<V>(
&self,
vec: Vec<V>,
added_bits: usize,
shift: F,
) -> Vec<V>
fn coset_lde_algebra<V>( &self, vec: Vec<V>, added_bits: usize, shift: F, ) -> Vec<V>
vec onto a coset of a larger subgroup. Read moreSource§fn coset_lde_algebra_batch<V>(
&self,
mat: DenseMatrix<V>,
added_bits: usize,
shift: F,
) -> DenseMatrix<V>
fn coset_lde_algebra_batch<V>( &self, mat: DenseMatrix<V>, added_bits: usize, shift: F, ) -> DenseMatrix<V>
mat onto a coset of a larger subgroup. Read moreAuto Trait Implementations§
impl<F> Freeze for RecursiveDft<F>
impl<F> !RefUnwindSafe for RecursiveDft<F>
impl<F> Send for RecursiveDft<F>
impl<F> Sync for RecursiveDft<F>
impl<F> Unpin for RecursiveDft<F>
impl<F> !UnwindSafe for RecursiveDft<F>
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