You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our work exclusively uses statically sized kernels so I think we'd prefer a way to specify the offsets statically; eg the size and offset are simultaneously determined.
But another possibility would be to accept offsets as a kwarg similar to how ndrange is accepted for DynamicSize?
Implemented in #771 (KA 0.10): ndrange entries may be index ranges, given at launch or statically, and @index(Global, Cartesian)/@index(Global, NTuple) return the shifted indices.
@kernelfunctionk!(A)
i, j =@index(Global, NTuple)
A[i, j] =1endk!(backend)(A; ndrange=(2:4, 3:5)) # at launchk!(backend, (2, 2), (2:4, 3:5))(A) # statically
Activity
vchuravy commentedon Apr 18, 2023
I talked with Simone and I think expressing this as an Index projection similar to
LinearIndiciesandCartesianIndicesis the right direction.b-fg commentedon May 1, 2023
In WaterLily we could also benefit from this as we are currently passing index offsets manually too.
maleadt commentedon Oct 19, 2026
Implemented in #771 (KA 0.10):
ndrangeentries may be index ranges, given at launch or statically, and@index(Global, Cartesian)/@index(Global, NTuple)return the shifted indices.