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

Add check that sparse fields are accessed offset in nested reductions and non-offset anywhere else #1049

Open
Stagno opened this issue Oct 23, 2020 · 0 comments
Labels

Comments

@Stagno
Copy link
Contributor

Stagno commented Oct 23, 2020

Considering the following field (or temporary field):

sparse_field: Field[Cell > Edge]

The following ways to access it are non-offset:

with sparse[Cell > Edge]:
   sparse_field = ... sparse_field...
sum_over(Cell > Edge, sparse_field)

while to access it offset, you would need nested reductions:

sum_over(Edge > Cell, sum_over(Cell > Edge, sparse_field))

Add a check (and tests) to enforce that the access is correctly tagged as offset/non-offset (i.e. offset iff inside nested reduction).

@Stagno Stagno added backend dawn related enhancement labels Oct 23, 2020
@Stagno Stagno changed the title Add check that sparse fields are accessed non-offset outside of reductions Add check that sparse fields are accessed offset in nested reductions and non-offset anywhere else Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant