pub trait FftBackend: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn is_available(&self) -> bool;
fn fft(
&self,
input: &[Complex64],
output: &mut [Complex64],
) -> FFTResult<()>;
fn ifft(
&self,
input: &[Complex64],
output: &mut [Complex64],
) -> FFTResult<()>;
fn fft_sized(
&self,
input: &[Complex64],
output: &mut [Complex64],
size: usize,
) -> FFTResult<()>;
fn ifft_sized(
&self,
input: &[Complex64],
output: &mut [Complex64],
size: usize,
) -> FFTResult<()>;
fn supports_feature(&self, feature: &str) -> bool;
}
Expand description
FFT Backend trait for implementing different FFT algorithms
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Description of the backend
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if this backend is available
Sourcefn fft(&self, input: &[Complex64], output: &mut [Complex64]) -> FFTResult<()>
fn fft(&self, input: &[Complex64], output: &mut [Complex64]) -> FFTResult<()>
Perform forward FFT
Sourcefn ifft(&self, input: &[Complex64], output: &mut [Complex64]) -> FFTResult<()>
fn ifft(&self, input: &[Complex64], output: &mut [Complex64]) -> FFTResult<()>
Perform inverse FFT
Sourcefn fft_sized(
&self,
input: &[Complex64],
output: &mut [Complex64],
size: usize,
) -> FFTResult<()>
fn fft_sized( &self, input: &[Complex64], output: &mut [Complex64], size: usize, ) -> FFTResult<()>
Perform FFT with specific size (may be cached)
Sourcefn ifft_sized(
&self,
input: &[Complex64],
output: &mut [Complex64],
size: usize,
) -> FFTResult<()>
fn ifft_sized( &self, input: &[Complex64], output: &mut [Complex64], size: usize, ) -> FFTResult<()>
Perform inverse FFT with specific size (may be cached)
Sourcefn supports_feature(&self, feature: &str) -> bool
fn supports_feature(&self, feature: &str) -> bool
Check if this backend supports a specific feature