Skip to content

Commit 67ffe56

Browse files
committed
remove allocation in fftshift
1 parent 8f1f4e4 commit 67ffe56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fftpack_fftshift.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
!> Shifts zero-frequency component to center of spectrum for `complex` type.
66
pure module function fftshift_crk(x) result(result)
77
complex(kind=rk), intent(in) :: x(:)
8-
complex(kind=rk), allocatable :: result(:)
8+
complex(kind=rk), dimension(size(x)) :: result
99

1010
result = cshift(x, shift=-floor(0.5_rk*size(x)))
1111

@@ -14,7 +14,7 @@ end function fftshift_crk
1414
!> Shifts zero-frequency component to center of spectrum for `real` type.
1515
pure module function fftshift_rrk(x) result(result)
1616
real(kind=rk), intent(in) :: x(:)
17-
real(kind=rk), allocatable :: result(:)
17+
real(kind=rk), dimension(size(x)) :: result
1818

1919
result = cshift(x, shift=-floor(0.5_rk*size(x)))
2020

0 commit comments

Comments
 (0)