KokkosBatched_Util: allow DynRankView in rank checks#3034
Closed
japlews wants to merge 1 commit intokokkos:developfrom
Closed
KokkosBatched_Util: allow DynRankView in rank checks#3034japlews wants to merge 1 commit intokokkos:developfrom
japlews wants to merge 1 commit intokokkos:developfrom
Conversation
Conditionally disable some compile-time checking
Contributor
Author
lucbv
requested changes
Apr 15, 2026
Contributor
lucbv
left a comment
There was a problem hiding this comment.
We should have a look at how the dynamic view is implemented and see if it returns extents for the dynamic ranks or static ranks only?
| static_assert(V_rank <= 2, "KokkosBatched: ViewType must have rank 0, 1 or 2."); | ||
| // Only allow View and DynRankView objects | ||
| if constexpr (Kokkos::is_view_v<ViewType>) { | ||
| static_assert(ViewType::rank() == 2, "KokkosBatched: ViewType must be rank 0, 1, or 2"); |
Contributor
There was a problem hiding this comment.
Suggested change
| static_assert(ViewType::rank() == 2, "KokkosBatched: ViewType must be rank 0, 1, or 2"); | |
| static_assert(ViewType::rank() <= 2, "KokkosBatched: ViewType must be rank 0, 1, or 2"); |
| static_assert(V_rank <= 2, "KokkosBatched: ViewType must have rank 0, 1 or 2."); | ||
| // Only allow View and DynRankView objects | ||
| if constexpr (Kokkos::is_view_v<ViewType>) { | ||
| static_assert(ViewType::rank() == 2, "KokkosBatched: ViewType must be rank 0, 1, or 2"); |
Contributor
There was a problem hiding this comment.
Suggested change
| static_assert(ViewType::rank() == 2, "KokkosBatched: ViewType must be rank 0, 1, or 2"); | |
| static_assert(ViewType::rank() <= 2, "KokkosBatched: ViewType must be rank 0, 1, or 2"); |
Contributor
|
@lucbv when this PR is finalized should it be include with 5.1.1? |
Contributor
|
Closing this since #3036 merged |
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.
Conditionally disable some compile-time checking