Skip to content

Commit 964aadf

Browse files
committed
fix indexing
1 parent 4dab9be commit 964aadf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ext/cuda/operators_fd_eager.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ Base.@propagate_inbounds function eager_copyto_stencil_kernel!(
8686
(i, j, h) = if mask isa NoMask
8787
# `Nij` comes from the type of `us`, so it is a compile-time constant and
8888
# the `CartesianIndices` decomposition below uses a fixed-divisor `divrem`.
89-
Nij = ClimaCore.DataLayouts.get_Nij(us)
89+
Nj = ClimaCore.DataLayouts.get_Nj(us)
90+
Ni = ClimaCore.DataLayouts.get_Ni(us)
9091
Nh = ClimaCore.DataLayouts.get_Nh(us)
91-
cart_inds = CartesianIndices((Nij, Nij, Nh))
92+
cart_inds = CartesianIndices((Ni, Nj, Nh))
9293
col_idx > length(cart_inds) && return nothing
9394
@inbounds cart_inds[col_idx].I
9495
else

0 commit comments

Comments
 (0)