Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offsetting kernel indices #384

Open
glwagner opened this issue Apr 18, 2023 · 2 comments
Open

Offsetting kernel indices #384

glwagner opened this issue Apr 18, 2023 · 2 comments

Comments

@glwagner
Copy link

It'd be extremely useful to have a feature for offsetting the kernel index, either at launch time or setup time.

Not sure what the best design or interface would be. @simone-silvestri and I discussed possibly embellishing StaticSize:

struct StaticSize{S} <: _Size
function StaticSize{S}() where S
new{S::Tuple{Vararg{Int}}}()
end

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?

@vchuravy
Copy link
Member

I talked with Simone and I think expressing this as an Index projection similar to LinearIndicies and CartesianIndices is the right direction.

@b-fg
Copy link

b-fg commented May 1, 2023

In WaterLily we could also benefit from this as we are currently passing index offsets manually too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants