Skip to content

Commit d8c9eda

Browse files
Merge pull request #1840 from CliMA/ck/stencil_params
Pass Nq and Nv throuh Val in copyto stencil
2 parents 93194ba + 3155b3e commit d8c9eda

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ext/cuda/operators_finite_difference.jl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ function Base.copyto!(
3636
strip_space(bc, space),
3737
axes(out),
3838
bounds,
39-
Nq,
39+
Val(Nv),
40+
Val(Nq),
4041
Nh,
41-
Nv,
4242
)
4343
auto_launch!(
4444
copyto_stencil_kernel!,
@@ -50,7 +50,15 @@ function Base.copyto!(
5050
return out
5151
end
5252

53-
function copyto_stencil_kernel!(out, bc, space, bds, Nq, Nh, Nv)
53+
function copyto_stencil_kernel!(
54+
out,
55+
bc,
56+
space,
57+
bds,
58+
::Val{Nv},
59+
::Val{Nq},
60+
Nh,
61+
) where {Nv, Nq}
5462
@inbounds begin
5563
gid = threadIdx().x + (blockIdx().x - 1) * blockDim().x
5664
if gid Nv * Nq * Nq * Nh

0 commit comments

Comments
 (0)