From 7f6b37337cfb3b65299180514b72f49302ba36a1 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Sun, 23 Jun 2024 21:16:07 -0400 Subject: [PATCH] Pass Nq and Nv throuh Val in copyto stencil --- ext/cuda/operators_finite_difference.jl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ext/cuda/operators_finite_difference.jl b/ext/cuda/operators_finite_difference.jl index b70897b6d5..c3bc7b85bb 100644 --- a/ext/cuda/operators_finite_difference.jl +++ b/ext/cuda/operators_finite_difference.jl @@ -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!, @@ -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