Skip to content

Commit 5069763

Browse files
committed
remove allocation in ifftshift
1 parent 67ffe56 commit 5069763

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fftpack_ifftshift.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 beginning of spectrum for `complex` type.
66
pure module function ifftshift_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=-ceiling(0.5_rk*size(x)))
1111

@@ -14,7 +14,7 @@ end function ifftshift_crk
1414
!> Shifts zero-frequency component to beginning of spectrum for `real` type.
1515
pure module function ifftshift_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=-ceiling(0.5_rk*size(x)))
2020

0 commit comments

Comments
 (0)