Skip to content

Commit

Permalink
Pass Nq and Nv throuh Val in copyto stencil
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jun 24, 2024
1 parent 93194ba commit 7f6b373
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions ext/cuda/operators_finite_difference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ function Base.copyto!(
strip_space(bc, space),
axes(out),
bounds,
Nq,
Val(Nv),
Val(Nq),
Nh,
Nv,
)
auto_launch!(
copyto_stencil_kernel!,
Expand All @@ -50,7 +50,15 @@ function Base.copyto!(
return out
end

function copyto_stencil_kernel!(out, bc, space, bds, Nq, Nh, Nv)
function copyto_stencil_kernel!(
out,
bc,
space,
bds,
Nh,
::Val{Nq},
::Val{Nv},
) where {Nv, Nq}
@inbounds begin
gid = threadIdx().x + (blockIdx().x - 1) * blockDim().x
if gid Nv * Nq * Nq * Nh
Expand Down

0 comments on commit 7f6b373

Please sign in to comment.