Skip to content

Commit

Permalink
Bug fix: Can now use dct/dst etc
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAshburner committed Apr 17, 2024
1 parent f25575b commit 7230aac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dst.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ end

function dst_scratch(d::NTuple{N, Integer}, dt::DataType) where {N}
global _scratch_dst
if ~@isdefined(_scratch_dst)
_scratch_dst = []
end
if dt<:CuArray
if (length(_scratch_dst) == 2*prod(d)) && (eltype(_scratch_dst)==Complex{eltype(dt)})
# Already defined
Expand All @@ -73,6 +76,7 @@ end

function dst_scratch(d::NTuple{N, Integer}, i::Integer) where {N}
global _scratch_dst
@assert(@isdefined(_scratch_dst))
@assert(length(_scratch_dst) == 2*prod(d))
d1 = [d...]
d1[i] = 2*d[i]
Expand Down

0 comments on commit 7230aac

Please sign in to comment.