Skip to content

Commit

Permalink
fix safe fft performance
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuseZ4 committed Oct 2, 2024
1 parent 05d3e87 commit 1fe64c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions enzyme/benchmarks/ReverseMode/fft/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![feature(slice_swap_unchecked)]
#![feature(autodiff)]

pub mod safe;
Expand Down
4 changes: 2 additions & 2 deletions enzyme/benchmarks/ReverseMode/fft/src/safe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ fn bitreversal_perm<T>(data: &mut [T]) {
while i < 2*len {
if j > i {
//dbg!(&i, &j);
data.swap(j-1, i-1);
data.swap(j, i);
unsafe {data.swap_unchecked(j-1, i-1);}
unsafe {data.swap_unchecked(j, i);}
}

let mut m = len;
Expand Down

0 comments on commit 1fe64c0

Please sign in to comment.