Skip to content

Commit

Permalink
Refactor DataLayouts
Browse files Browse the repository at this point in the history
Reduce more code duplication in DataLayouts

Reduce more code duplication

Reduce more code duplication
  • Loading branch information
charleskawczynski committed Aug 14, 2024
1 parent 7ab0acf commit 60e313d
Show file tree
Hide file tree
Showing 4 changed files with 199 additions and 453 deletions.
2 changes: 1 addition & 1 deletion ext/cuda/data_layouts_copyto.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function knl_copyto_flat!(dest::AbstractData, bc, us)
end

function cuda_copyto!(dest::AbstractData, bc)
(_, _, Nv, Nh) = DataLayouts.universal_size(dest)
(_, _, Nv, _, Nh) = DataLayouts.universal_size(dest)
us = DataLayouts.UniversalSize(dest)
if Nv > 0 && Nh > 0
auto_launch!(knl_copyto_flat!, (dest, bc, us), dest; auto = true)
Expand Down
2 changes: 1 addition & 1 deletion ext/cuda/data_layouts_fill.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function knl_fill_flat!(dest::AbstractData, val, us)
end

function cuda_fill!(dest::AbstractData, val)
(_, _, Nv, Nh) = DataLayouts.universal_size(dest)
(_, _, Nv, _, Nh) = DataLayouts.universal_size(dest)
us = DataLayouts.UniversalSize(dest)
if Nv > 0 && Nh > 0
auto_launch!(knl_fill_flat!, (dest, val, us), dest; auto = true)
Expand Down
Loading

0 comments on commit 60e313d

Please sign in to comment.