Skip to content

Commit

Permalink
support SubArray on fill
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyrne committed Jul 20, 2023
1 parent 6af8766 commit dff77b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/DataLayouts/cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ end
function Base.fill!(
dest::IJFH{S, Nij, A},
val,
) where {S, Nij, A <: CUDA.CuArray}
) where {
S,
Nij,
A <: Union{CUDA.CuArray, SubArray{<:Any, <:Any, <:CUDA.CuArray}},
}
_, _, _, _, Nh = size(dest)
if Nh > 0
CUDA.@cuda threads = (Nij, Nij) blocks = (Nh, 1) knl_fill!(dest, val)
Expand Down

0 comments on commit dff77b0

Please sign in to comment.