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

View iterators should be mapping aware #788

Open
bernhardmgruber opened this issue Oct 4, 2023 · 0 comments
Open

View iterators should be mapping aware #788

bernhardmgruber opened this issue Oct 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bernhardmgruber
Copy link
Member

bernhardmgruber commented Oct 4, 2023

Currently, a LLAMA View's iterator iterates through the MD-array by iterating the index space and passing those indices to the mapping function. This is inefficient for some mappings, like AoSoA or Bitpacked*. A better approach would be to provide two iteration schemes:

  • Use ArrayIndexRange to iterate the index space, and explicitely pass those indices to a view. This iterates with a fixed traversal, independent of the mapping
  • A view's iterators should be customizable by the mapping, and not give any guarantee on the iteration order. This way, mappings can provide more optimal iterations. Alternatively, a for_each primitive could be offered, which also allows for mapping aware iteration.

See also Bryce's talk on Multidimensional C++: https://youtu.be/aFCLmQEkPUw?t=1933

@bernhardmgruber bernhardmgruber added the enhancement New feature or request label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant