Skip to content

Commit

Permalink
fix order of fft2D and fft3D operations
Browse files Browse the repository at this point in the history
fixes: #4
  • Loading branch information
tmcdonell committed Feb 6, 2017
1 parent 5dc6178 commit d4ab941
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Data/Array/Accelerate/Math/FFT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ fft2D' mode (Z :. height :. width) arr
#endif
fft'

fft' a = A.transpose . fft sign (Z:.width) height
>-> A.transpose . fft sign (Z:.height) width
fft' a = A.transpose . fft sign (Z:.height) width
>-> A.transpose . fft sign (Z:.width) height
$ a
in
case mode of
Expand Down Expand Up @@ -195,7 +195,7 @@ fft3D' :: forall e. FFTElt e
-> Acc (Array DIM3 (Complex e))
fft3D' mode (Z :. depth :. height :. width) arr
= let sign = signOfMode mode :: e
scale = P.fromIntegral (width * height)
scale = P.fromIntegral (width * height * depth)
go =
#ifdef ACCELERATE_LLVM_NATIVE_BACKEND
foreignAcc (Native.fft3D mode) $
Expand All @@ -208,9 +208,9 @@ fft3D' mode (Z :. depth :. height :. width) arr
#endif
fft'

fft' a = rotate3D . fft sign (Z:.width :.depth) height
fft' a = rotate3D . fft sign (Z:.depth :.height) width
>-> rotate3D . fft sign (Z:.height:.width) depth
>-> rotate3D . fft sign (Z:.depth :.height) width
>-> rotate3D . fft sign (Z:.width :.depth) height
$ a
in
case mode of
Expand Down

0 comments on commit d4ab941

Please sign in to comment.