Skip to content

Commit

Permalink
Replace naive deinterleave in R2C FFT
Browse files Browse the repository at this point in the history
  • Loading branch information
smu160 committed Aug 17, 2024
1 parent de59553 commit 3e819b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::planner::{Planner32, Planner64};
use crate::{
fft_32_with_opts_and_plan, fft_64, fft_64_with_opts_and_plan,
twiddles::{generate_twiddles, Twiddles},
utils::deinterleave,
Direction, Options,
};

Expand Down Expand Up @@ -58,8 +59,8 @@ macro_rules! impl_r2c_fft {
let big_n = input_re.len();

// Splitting odd and even
let (mut z_even, mut z_odd): (Vec<_>, Vec<_>) =
input_re.chunks_exact(2).map(|c| (c[0], c[1])).unzip();

let (mut z_even, mut z_odd): (Vec<_>, Vec<_>) = deinterleave(&input_re);

// let mut planner = <$planner>::new(big_n, Direction::Forward);

Expand Down

0 comments on commit 3e819b4

Please sign in to comment.