502 ippl does consistently consider striding in indexes#503
Draft
aaadelmann wants to merge 8 commits into
Draft
Conversation
Collaborator
|
cscs-ci run cscs-ci-gh200, cscs-ci-mi300, cscs-ci-openmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR restores old-IPPL-style field access behavior for strided indexes and adds a first Kokkos IPPL implementation of dense and sparse subfield access.
This PR adds an initial SIndex and sparse field view implementation.
Users can build explicit sparse point sets:
The main goal is that
Index,NDIndex, and sparseSIndexfield operations consistently respect strides and can be used naturally in field expressions.User-Facing Field Indexing
Dense subdomains can now be assigned directly:
Chained indexing is also supported:
The indexed views preserve the selected global index coordinates and map them back to local Kokkos view coordinates, including ghost offsets.
Strided Index Semantics
Index behavior now accounts for actual grid points rather than only interval endpoints:
This fixes cases such as even and odd strided indexes being incorrectly treated as touching.
Sparse SIndex Access
Predicate-Built Sparse Indexes
Sparse indexes can be built from field predicates, matching the main old TestSIndex.cpp workflow:
ippl::SIndex<Dim> si(layout); si = field > threshold; out[si] = field[si];Subsetted predicate construction is also supported:
A compatibility helper is provided:
Sparse Compound Assignment
Sparse field views support compound updates:
This covers the old benchmark pattern:
B[SI] *= 1.01;SIndex Set Operations
The following sparse set operations are available:
Tests
Added coverage for:
Deferred