Skip to content

Conversation

@yasahi-hpc
Copy link
Collaborator

This PR aims at generalizing is_transpose_needed helper.
It may be that the input type is std::array<std::size_t, DIM> for distributed case

@yasahi-hpc yasahi-hpc self-assigned this Oct 30, 2025
@yasahi-hpc yasahi-hpc force-pushed the generalize-is-transpose-needed branch from 425825c to 9cc4277 Compare October 30, 2025 15:37
@science-enthusiast
Copy link

science-enthusiast commented Oct 31, 2025

Looks fine to me. Just one observation. There is no test for static_assert(std::is_integral_v<IntType>, "is_transpose_needed: IntType must be an integral type.");. Maybe it is too much work to add an invalid value_type to the list of possible value_types.

@yasahi-hpc
Copy link
Collaborator Author

@science-enthusiast
Thanks for the review

Looks fine to me. Just one observation. There is no test for static_assert(std::is_integral_v, "is_transpose_needed: IntType must be an integral type.");. Maybe it is too much work to add an invalid value_type to the list of possible values.

Strictly speaking, we can parameterize over more types: int8_t and so on.
In practice, we only use either int or std::size_t, so current tests should be fine

Copy link

@PaulGannay PaulGannay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine otherwise

/// \tparam DIM The dimensionality of the axes
///
/// \param[in] map The map used for permutation
template <typename IntType, std::size_t DIM>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IntType should be renamed to IndexType.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks
I have fixed accordingly

@yasahi-hpc
Copy link
Collaborator Author

Thanks @science-enthusiast @PaulGannay

I will merge this

@yasahi-hpc yasahi-hpc merged commit f627206 into kokkos:main Oct 31, 2025
39 checks passed
@yasahi-hpc yasahi-hpc deleted the generalize-is-transpose-needed branch October 31, 2025 08:55
@yasahi-hpc yasahi-hpc mentioned this pull request Oct 31, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants