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

<mdspan>: layout_stride improvements #3673

Merged

Conversation

JMazurkiewicz
Copy link
Contributor

  • Implement WG21-P2763R1,
  • Implement preconditions (currently unconditional),
  • Implement (incomplete) regular tests and death tests.

@JMazurkiewicz JMazurkiewicz requested a review from a team as a code owner April 26, 2023 13:20
@StephanTLavavej StephanTLavavej added the mdspan C++23 mdspan label Apr 26, 2023
@StephanTLavavej StephanTLavavej self-assigned this Apr 26, 2023
// Tests of 'is_exhaustive' are defined in 'check_is_exhaustive' function [FIXME]
}

{ // Check 'stride' function (intentionally not if constexpr)
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused by "(intentionally not if constexpr)" here - I don't see any if at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if statement used to be here, I forgot to fix the comment


template <class IndexType, size_t... Extents, size_t... Indices>
constexpr void do_check_members(const extents<IndexType, Extents...>& ext,
const array<IndexType, sizeof...(Extents)> strs, index_sequence<Indices...>) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: I would usually expect array to be passed by const reference, not by const value, although this doesn't affect test correctness or lead to test instability. Occurs below.

@StephanTLavavej StephanTLavavej merged commit ea8995d into microsoft:feature/mdspan2 Apr 26, 2023
@StephanTLavavej
Copy link
Member

Just a small question and suggestion, but I went ahead and merged this - thank you! 😻 🚀 ✅

@JMazurkiewicz JMazurkiewicz deleted the mdspan/layout_stride branch April 26, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mdspan C++23 mdspan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants