This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
Conversation
This file contains 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
mhoemmen
approved these changes
Mar 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fixes! : - D
@@ -208,7 +208,8 @@ 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...); | |||
// Immediately cast incoming indices to `index_type` | |||
return __compute_offset(__rank_count<0, extents_type::rank()>(), static_cast<index_type>(__idxs)...); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cast is a conforming implementation per http://eel.is/c++draft/mdspan.layout.left.obs .
@@ -451,7 +451,9 @@ struct layout_stride { | |||
) | |||
__MDSPAN_FORCE_INLINE_FUNCTION | |||
constexpr index_type operator()(_Indices... __idxs) const noexcept { | |||
return __impl::_call_op_impl(*this, static_cast<index_type>(__idxs)...); | |||
// Should the op_impl operate in terms of `index_type` rather than `size_t`? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks legit per http://eel.is/c++draft/mdspan.layout.stride.obs
wmaxey
force-pushed
the
bugfix/mdspan_msvc
branch
from
March 13, 2023 23:12
e72b52a
to
04f160e
Compare
…uses library defined macros
miscco
approved these changes
Mar 14, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This marks all tests unsupported on MSVC && C++14/17.
Backports to C++20 are only blessed on MSVC 14.3X found in Visual Studio 2022.