pub struct FFTConvolution<A = Global> { /* private fields */ }
Expand description
§Availability
This API is marked as unstable and is only available when the unstable-enable
crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Implementations§
Trait Implementations§
Source§impl<A> Clone for FFTConvolution<A>
impl<A> Clone for FFTConvolution<A>
Source§impl<I, A> ConvolutionAlgorithm<I> for FFTConvolution<A>
impl<I, A> ConvolutionAlgorithm<I> for FFTConvolution<A>
Source§type PreparedConvolutionOperand = PreparedConvolutionOperand<I, A>
type PreparedConvolutionOperand = PreparedConvolutionOperand<I, A>
Additional data associated to a list of ring elements, which can be used to
compute a convolution where this list is one of the operands faster. Read more
Source§fn compute_convolution<S: RingStore<Type = I>, V1: VectorView<I::Element>, V2: VectorView<I::Element>>(
&self,
lhs: V1,
rhs: V2,
dst: &mut [I::Element],
ring: S,
)
fn compute_convolution<S: RingStore<Type = I>, V1: VectorView<I::Element>, V2: VectorView<I::Element>>( &self, lhs: V1, rhs: V2, dst: &mut [I::Element], ring: S, )
Source§fn supports_ring<S: RingStore<Type = I> + Copy>(&self, _ring: S) -> bool
fn supports_ring<S: RingStore<Type = I> + Copy>(&self, _ring: S) -> bool
Returns whether this convolution algorithm supports computations of
the given ring. Read more
Source§fn prepare_convolution_operand<S, V>(
&self,
val: V,
len_hint: Option<usize>,
ring: S,
) -> Self::PreparedConvolutionOperand
fn prepare_convolution_operand<S, V>( &self, val: V, len_hint: Option<usize>, ring: S, ) -> Self::PreparedConvolutionOperand
Takes an input list of values and computes an opaque
ConvolutionAlgorithm::PreparedConvolutionOperand
,
which can be used to compute future convolutions with this list of values faster. Read moreSource§fn compute_convolution_prepared<S, V1, V2>(
&self,
lhs: V1,
lhs_prep: Option<&Self::PreparedConvolutionOperand>,
rhs: V2,
rhs_prep: Option<&Self::PreparedConvolutionOperand>,
dst: &mut [I::Element],
ring: S,
)
fn compute_convolution_prepared<S, V1, V2>( &self, lhs: V1, lhs_prep: Option<&Self::PreparedConvolutionOperand>, rhs: V2, rhs_prep: Option<&Self::PreparedConvolutionOperand>, dst: &mut [I::Element], ring: S, )
Elementwise adds the convolution of
lhs
and rhs
to dst
. If provided, the given
prepared convolution operands are used for a faster computation. Read moreSource§fn compute_convolution_sum<'a, S, J, V1, V2>(
&self,
values: J,
dst: &mut [I::Element],
ring: S,
)where
S: RingStore<Type = I> + Copy,
J: Iterator<Item = (V1, Option<&'a Self::PreparedConvolutionOperand>, V2, Option<&'a Self::PreparedConvolutionOperand>)>,
V1: VectorView<I::Element>,
V2: VectorView<I::Element>,
Self: 'a,
I: 'a,
Self::PreparedConvolutionOperand: 'a,
fn compute_convolution_sum<'a, S, J, V1, V2>(
&self,
values: J,
dst: &mut [I::Element],
ring: S,
)where
S: RingStore<Type = I> + Copy,
J: Iterator<Item = (V1, Option<&'a Self::PreparedConvolutionOperand>, V2, Option<&'a Self::PreparedConvolutionOperand>)>,
V1: VectorView<I::Element>,
V2: VectorView<I::Element>,
Self: 'a,
I: 'a,
Self::PreparedConvolutionOperand: 'a,
Computes a convolution for each tuple in the given sequence, and sums the result of each convolution
to
dst
. Read moreSource§impl<'a, A> From<&'a FFTConvolution<A>> for &'a FFTConvolutionZn<A>where
A: Allocator,
impl<'a, A> From<&'a FFTConvolution<A>> for &'a FFTConvolutionZn<A>where
A: Allocator,
Source§fn from(value: &'a FFTConvolution<A>) -> Self
fn from(value: &'a FFTConvolution<A>) -> Self
Converts to this type from the input type.
Source§impl<'a, A> From<&'a FFTConvolutionZn<A>> for &'a FFTConvolution<A>where
A: Allocator,
impl<'a, A> From<&'a FFTConvolutionZn<A>> for &'a FFTConvolution<A>where
A: Allocator,
Source§fn from(value: &'a FFTConvolutionZn<A>) -> Self
fn from(value: &'a FFTConvolutionZn<A>) -> Self
Converts to this type from the input type.
Source§impl<A> From<FFTConvolution<A>> for FFTConvolutionZn<A>where
A: Allocator,
impl<A> From<FFTConvolution<A>> for FFTConvolutionZn<A>where
A: Allocator,
Source§fn from(value: FFTConvolution<A>) -> Self
fn from(value: FFTConvolution<A>) -> Self
Converts to this type from the input type.
Source§impl<A> From<FFTConvolutionZn<A>> for FFTConvolution<A>where
A: Allocator,
impl<A> From<FFTConvolutionZn<A>> for FFTConvolution<A>where
A: Allocator,
Source§fn from(value: FFTConvolutionZn<A>) -> Self
fn from(value: FFTConvolutionZn<A>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<A = Global> !Freeze for FFTConvolution<A>
impl<A = Global> !RefUnwindSafe for FFTConvolution<A>
impl<A> Send for FFTConvolution<A>where
A: Send,
impl<A> Sync for FFTConvolution<A>where
A: Sync,
impl<A> Unpin for FFTConvolution<A>where
A: Unpin,
impl<A> UnwindSafe for FFTConvolution<A>where
A: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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