pub struct FftProcessor<T: FftNum> { /* private fields */ }
Expand description
Manages FFT planning and execution for convolution operations.
Implementations§
Source§impl<T: FftNum> Processor<T>
impl<T: FftNum> Processor<T>
Sourcepub fn get_scratch<const N: usize>(
&mut self,
input_dim: [usize; N],
) -> Vec<Complex<T>>
pub fn get_scratch<const N: usize>( &mut self, input_dim: [usize; N], ) -> Vec<Complex<T>>
Creates a scratch buffer for FFT operations.
This method calculates the required size for the scratch buffer based on the input dimensions and creates a vector with uninitialized memory to use as the scratch buffer for the real and complex FFTs.
§Arguments
Sourcepub fn forward<S: DataMut<Elem = T>, const N: usize>(
&mut self,
input: &mut ArrayBase<S, Dim<[Ix; N]>>,
) -> Array<Complex<T>, Dim<[Ix; N]>>
pub fn forward<S: DataMut<Elem = T>, const N: usize>( &mut self, input: &mut ArrayBase<S, Dim<[Ix; N]>>, ) -> Array<Complex<T>, Dim<[Ix; N]>>
Performs a forward FFT on the given input array.
This method computes the forward Fast Fourier Transform of the input array using a real-to-complex FFT in the last dimension and complex-to-complex FFTs in the other dimensions.
§Arguments
input
: A mutable reference to the input array.
Sourcepub fn backward<const N: usize>(
&mut self,
input: Array<Complex<T>, Dim<[Ix; N]>>,
) -> Array<T, Dim<[Ix; N]>>
pub fn backward<const N: usize>( &mut self, input: Array<Complex<T>, Dim<[Ix; N]>>, ) -> Array<T, Dim<[Ix; N]>>
Performs an inverse FFT on the given input array.
This method computes the inverse Fast Fourier Transform of the input array using a complex-to-real FFT in the last dimension and complex-to-complex FFTs in the other dimensions.
§Arguments
input
: The input array.
Sourcepub fn forward_with_scratch<S: DataMut<Elem = T>, const N: usize>(
&mut self,
input: &mut ArrayBase<S, Dim<[Ix; N]>>,
scratch: &mut Vec<Complex<T>>,
) -> Array<Complex<T>, Dim<[Ix; N]>>
pub fn forward_with_scratch<S: DataMut<Elem = T>, const N: usize>( &mut self, input: &mut ArrayBase<S, Dim<[Ix; N]>>, scratch: &mut Vec<Complex<T>>, ) -> Array<Complex<T>, Dim<[Ix; N]>>
Performs a forward FFT on the given input array using a scratch buffer.
This method computes the forward Fast Fourier Transform of the input array using a real-to-complex FFT in the last dimension and complex-to-complex FFTs in the other dimensions. It uses the given scratch buffer for FFT calculations, potentially improving performance for multiple FFT calls.
§Arguments
input
: A mutable reference to the input array.
Sourcepub fn backward_with_scratch<const N: usize>(
&mut self,
input: Array<Complex<T>, Dim<[Ix; N]>>,
scratch: &mut Vec<Complex<T>>,
) -> Array<T, Dim<[Ix; N]>>
pub fn backward_with_scratch<const N: usize>( &mut self, input: Array<Complex<T>, Dim<[Ix; N]>>, scratch: &mut Vec<Complex<T>>, ) -> Array<T, Dim<[Ix; N]>>
Performs an inverse FFT on the given input array using a scratch buffer.
This method computes the inverse Fast Fourier Transform of the input array using a complex-to-real FFT in the last dimension and complex-to-complex FFTs in the other dimensions. It uses the given scratch buffer for FFT calculations, potentially improving performance for multiple FFT calls.
§Arguments
input
: The input array.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Processor<T>
impl<T> !RefUnwindSafe for Processor<T>
impl<T> Send for Processor<T>
impl<T> Sync for Processor<T>
impl<T> Unpin for Processor<T>where
T: Unpin,
impl<T> !UnwindSafe for Processor<T>
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