Skip to content

Commit

Permalink
Update for CUDA.jl v5.5.2
Browse files Browse the repository at this point in the history
Older versions are no longer supported.
  • Loading branch information
jipolanco committed Oct 15, 2024
1 parent 0df18d9 commit e7f0764
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/plan.jl
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
abstract type AbstractNUFFTData{T <: Number, N, Nc} end

# Note: for some reason CUDA.jl inverts the element type associated to r2c and c2r plans,
# e.g. plan_rfft returns a Plan{Complex{T}} and plan_brfft returns a Plan{T}, which is the
# opposite of FFTW.jl. The current solution is simply not to restrict the types too much.
# Computations are still correct when using CUDA, it's just a matter of types.
struct RealNUFFTData{
T <: AbstractFloat, N, Nc,
WaveNumbers <: NTuple{N, AbstractVector{T}},
FieldsR <: NTuple{Nc, AbstractArray{T, N}},
FieldsC <: NTuple{Nc, AbstractArray{Complex{T}, N}},
PlanFFT_fw <: AbstractFFTs.Plan{<:Union{T, Complex{T}}}, # AbstractFFTs.Plan{T}, <-- this doesn't work on CUDA.jl
PlanFFT_bw <: AbstractFFTs.Plan{<:Union{T, Complex{T}}}, # AbstractFFTs.Plan{Complex{T}}, <--|
PlanFFT_fw <: AbstractFFTs.Plan{T}, # this requires CUDA.jl 5.5.2 (see CUDA.jl#2504)
PlanFFT_bw <: AbstractFFTs.Plan{Complex{T}},
} <: AbstractNUFFTData{T, N, Nc}
ks :: WaveNumbers # wavenumbers in *non-oversampled* Fourier grid
us :: FieldsR # values in oversampled grid (real)
Expand Down

0 comments on commit e7f0764

Please sign in to comment.