pub struct NeighborsLastSingleThread<DC> {
pub domain_context: DC,
pub log_base_len: usize,
}Expand description
A single-threaded implementation of AdditiveNTT.
The code only makes sure that it’s fast for a large data input. For small inputs, it can be comparatively slow!
The implementation is depth-first, but calls a breadth-first implementation as a base case.
Note that “neighbors last” refers to the memory layout for the NTT: In the last layer of this NTT algorithm, neighboring elements speak to each other. In the classic FFT that’s usually the case for “decimation in frequency”.
Fields§
§domain_context: DCThe domain context from which the twiddles are pulled.
log_base_len: usizeDetermines when to switch from depth-first to the breadth-first base case.
Implementations§
Source§impl<DC> NeighborsLastSingleThread<DC>
impl<DC> NeighborsLastSingleThread<DC>
Trait Implementations§
Source§impl<DC: DomainContext> AdditiveNTT for NeighborsLastSingleThread<DC>
impl<DC: DomainContext> AdditiveNTT for NeighborsLastSingleThread<DC>
type Field = <DC as DomainContext>::Field
Source§fn forward_transform<P: PackedField<Scalar = Self::Field>>(
&self,
data: FieldSliceMut<'_, P>,
skip_early: usize,
skip_late: usize,
)
fn forward_transform<P: PackedField<Scalar = Self::Field>>( &self, data: FieldSliceMut<'_, P>, skip_early: usize, skip_late: usize, )
Source§fn inverse_transform<P: PackedField<Scalar = Self::Field>>(
&self,
_data_orig: FieldSliceMut<'_, P>,
_skip_early: usize,
_skip_late: usize,
)
fn inverse_transform<P: PackedField<Scalar = Self::Field>>( &self, _data_orig: FieldSliceMut<'_, P>, _skip_early: usize, _skip_late: usize, )
Inverse transformation of
Self::forward_transform. Read moreSource§fn domain_context(&self) -> &impl DomainContext<Field = DC::Field>
fn domain_context(&self) -> &impl DomainContext<Field = DC::Field>
The associated
DomainContext.Source§fn log_domain_size(&self) -> usize
fn log_domain_size(&self) -> usize
Auto Trait Implementations§
impl<DC> Freeze for NeighborsLastSingleThread<DC>where
DC: Freeze,
impl<DC> RefUnwindSafe for NeighborsLastSingleThread<DC>where
DC: RefUnwindSafe,
impl<DC> Send for NeighborsLastSingleThread<DC>where
DC: Send,
impl<DC> Sync for NeighborsLastSingleThread<DC>where
DC: Sync,
impl<DC> Unpin for NeighborsLastSingleThread<DC>where
DC: Unpin,
impl<DC> UnwindSafe for NeighborsLastSingleThread<DC>where
DC: 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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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