Skip to content

Commit dc52afd

Browse files
authored
Update ft2d.jl
fix CUDA scalar indexing
1 parent 629663b commit dc52afd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Common/ft2d.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ function real2recip(dnx,dny,f)
1717
F0=fftshift(fft(f))/length(f)
1818
a=Int64(ceil(size(f,1)/2+.5))
1919
b=Int64(ceil(size(f,2)/2+.5))
20-
F=0.0im*dnx
20+
F=0.0im*Matrix(dnx)
2121
for i=1:size(F,1)
2222
for j=1:size(F,2)
23-
F[i,j]=F0[dnx[i,j]+a,dny[i,j]+b]
23+
F[i,j]=F0[Matrix(dnx)[i,j]+a,Matrix(dny)[i,j]+b]
2424
end
2525
end
2626
return F

0 commit comments

Comments
 (0)