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

Fix an ICE on MSVC 14.3X #246

Merged
merged 3 commits into from
Mar 14, 2023
Merged

Fix an ICE on MSVC 14.3X #246

merged 3 commits into from
Mar 14, 2023

Conversation

wmaxey
Copy link
Contributor

@wmaxey wmaxey commented Mar 13, 2023

These changes were ported from libcudacxx.

MSVC has an issue parsing the aggregate expression comparing extents. Fixed by adding a small helper.

Left and right layout changes fixed a warning we were seeing in testing and seem to be conforming.

@@ -163,7 +163,7 @@ class layout_left::mapping {
)
_MDSPAN_HOST_DEVICE
constexpr index_type operator()(Indices... idxs) const noexcept {
return __compute_offset(__rank_count<0, extents_type::rank()>(), idxs...);
return __compute_offset(__rank_count<0, extents_type::rank()>(), static_cast<index_type>(idxs)...);
Copy link
Contributor

Choose a reason for hiding this comment

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

We discussed these changes. They conform with the spec, as far as I can tell.

Copy link
Contributor

@mhoemmen mhoemmen left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@crtrott crtrott merged commit b31a635 into kokkos:stable Mar 14, 2023
mhoemmen added a commit to mhoemmen/mdspan that referenced this pull request Jul 26, 2023
This avoids any ODR violations for the lambda itself.
It's a generic lambda, so we don't have to worry about its operator().

Fixes kokkos#246.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants