pub struct OptimizedFFT { /* private fields */ }Expand description
FFTW-like optimized FFT implementation
Implementations§
Source§impl OptimizedFFT
impl OptimizedFFT
Sourcepub fn new(config: OptimizedConfig) -> Self
pub fn new(config: OptimizedConfig) -> Self
Create a new optimized FFT instance
Sourcepub fn set_collect_stats(&mut self, enable: bool)
pub fn set_collect_stats(&mut self, enable: bool)
Enable or disable performance statistics collection
Sourcepub fn get_stats(&self) -> &PerformanceStats
pub fn get_stats(&self) -> &PerformanceStats
Get performance statistics
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset performance statistics
Sourcepub fn get_metrics(
&self,
size: usize,
level: OptimizationLevel,
) -> Option<PerformanceMetrics>
pub fn get_metrics( &self, size: usize, level: OptimizationLevel, ) -> Option<PerformanceMetrics>
Get performance metrics for a specific size and optimization level
Sourcepub fn get_all_metrics(&self) -> Vec<PerformanceMetrics>
pub fn get_all_metrics(&self) -> Vec<PerformanceMetrics>
Get all collected performance metrics
Sourcepub fn fft<T>(
&mut self,
input: &[T],
n: Option<usize>,
) -> FFTResult<Vec<Complex64>>
pub fn fft<T>( &mut self, input: &[T], n: Option<usize>, ) -> FFTResult<Vec<Complex64>>
Compute FFT using the most optimal algorithm
Sourcepub fn ifft(
&mut self,
input: &[Complex64],
n: Option<usize>,
) -> FFTResult<Vec<Complex64>>
pub fn ifft( &mut self, input: &[Complex64], n: Option<usize>, ) -> FFTResult<Vec<Complex64>>
Perform an optimized inverse FFT
Sourcepub fn benchmark_sizes(
&mut self,
min_size: usize,
max_size: usize,
step: usize,
) -> FFTResult<HashMap<usize, PerformanceMetrics>>
pub fn benchmark_sizes( &mut self, min_size: usize, max_size: usize, step: usize, ) -> FFTResult<HashMap<usize, PerformanceMetrics>>
Benchmark different FFT sizes to find optimal algorithms
Sourcepub fn fft2<S>(
&mut self,
input: &ArrayBase<S, Ix2>,
) -> FFTResult<Array<Complex64, Ix2>>
pub fn fft2<S>( &mut self, input: &ArrayBase<S, Ix2>, ) -> FFTResult<Array<Complex64, Ix2>>
Perform 2D FFT with optimizations
Sourcepub fn suggest_optimal_size(&self, requestedsize: usize) -> usize
pub fn suggest_optimal_size(&self, requestedsize: usize) -> usize
Suggest the optimal FFT size near the requested size
Auto Trait Implementations§
impl !Freeze for OptimizedFFT
impl RefUnwindSafe for OptimizedFFT
impl Send for OptimizedFFT
impl Sync for OptimizedFFT
impl Unpin for OptimizedFFT
impl UnwindSafe for OptimizedFFT
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> 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