Skip to content

Commit

Permalink
Fix assertion in fft_with_opts_and_plan
Browse files Browse the repository at this point in the history
- Twiddles should always be half the size of input
  • Loading branch information
smu160 committed Feb 9, 2024
1 parent 9512dc4 commit 648d4d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub fn fft_with_opts_and_plan(

// We shouldn't be able to execute FFT if the # of twiddles isn't equal to the distance
// between pairs
assert!(twiddles_re.len() / 2 == reals.len() && twiddles_im.len() / 2 == imags.len());
assert!(twiddles_re.len() == reals.len() / 2 && twiddles_im.len() == imags.len() / 2);

for t in (0..n).rev() {
let dist = 1 << t;
Expand Down

0 comments on commit 648d4d2

Please sign in to comment.