Skip to content

Commit d5e8053

Browse files
committed
Use AbstractFFTs instead of FFTW.
1 parent a2bf43f commit d5e8053

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
33
version = "1.0.4"
44

55
[deps]
6+
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
67
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
78
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
89
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
@@ -11,6 +12,7 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
1112
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1213

1314
[compat]
15+
AbstractFFTs = "0.4"
1416
Adapt = "0.4.1, 1.0"
1517
julia = "1.0"
1618

src/GPUArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using Printf
1212
using LinearAlgebra.BLAS
1313
using Base.Cartesian
1414

15-
using FFTW
15+
using AbstractFFTs
1616

1717
using Adapt
1818

src/array.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ struct FFTPlan{T}
225225
p::T
226226
end
227227

228-
FFTW.plan_fft(A::JLArray; kw_args...) = FFTPlan(plan_fft(A.data; kw_args...))
229-
FFTW.plan_fft!(A::JLArray; kw_args...) = FFTPlan(plan_fft!(A.data; kw_args...))
230-
FFTW.plan_bfft!(A::JLArray; kw_args...) = FFTPlan(plan_bfft!(A.data; kw_args...))
231-
FFTW.plan_bfft(A::JLArray; kw_args...) = FFTPlan(plan_bfft(A.data; kw_args...))
232-
FFTW.plan_ifft!(A::JLArray; kw_args...) = FFTPlan(plan_ifft!(A.data; kw_args...))
233-
FFTW.plan_ifft(A::JLArray; kw_args...) = FFTPlan(plan_ifft(A.data; kw_args...))
228+
AbstractFFTs.plan_fft(A::JLArray; kw_args...) = FFTPlan(plan_fft(A.data; kw_args...))
229+
AbstractFFTs.plan_fft!(A::JLArray; kw_args...) = FFTPlan(plan_fft!(A.data; kw_args...))
230+
AbstractFFTs.plan_bfft!(A::JLArray; kw_args...) = FFTPlan(plan_bfft!(A.data; kw_args...))
231+
AbstractFFTs.plan_bfft(A::JLArray; kw_args...) = FFTPlan(plan_bfft(A.data; kw_args...))
232+
AbstractFFTs.plan_ifft!(A::JLArray; kw_args...) = FFTPlan(plan_ifft!(A.data; kw_args...))
233+
AbstractFFTs.plan_ifft(A::JLArray; kw_args...) = FFTPlan(plan_ifft(A.data; kw_args...))
234234

235235
function Base.:(*)(plan::FFTPlan, A::JLArray)
236236
x = plan.p * A.data

0 commit comments

Comments
 (0)