pub fn irfft_simd<T>(
input: &[T],
n: Option<usize>,
norm: Option<&str>,
) -> FFTResult<Vec<f64>>
Expand description
Compute the inverse of the 1-dimensional discrete Fourier Transform for real input with SIMD acceleration.
This function is optimized using SIMD instructions for improved performance on modern CPUs.
§Arguments
input
- Input complex-valued array representing the Fourier transform of real datan
- Length of the output array (optional)norm
- Normalization mode (optional)
§Returns
- The inverse Fourier transform, yielding a real-valued array
§Examples
use scirs2_fft::simd_rfft::{rfft_simd, irfft_simd};
// Generate a simple signal
let signal = vec![1.0, 2.0, 3.0, 4.0];
// Forward transform
let spectrum = rfft_simd(&signal, None, None).unwrap();
// Inverse transform
let recovered = irfft_simd(&spectrum, Some(signal.len()), None).unwrap();
// Check recovery accuracy
for (x, y) in signal.iter().zip(recovered.iter()) {
assert!((x - y).abs() < 1e-10);
}