Skip to content

P3480R6 std::simd is a range #7998

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

Closed
wants to merge 4 commits into from

Conversation

mattkretz
Copy link
Member

@mattkretz mattkretz force-pushed the motions-2025-06-lwg-11 branch from c42ed8a to b4176cc Compare June 23, 2025 15:06
Copy link
Member

@Eisenwave Eisenwave left a comment

Choose a reason for hiding this comment

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

Changes look correct, but missing index entries.

Comment on lines +17457 to +17464
using iterator = \exposid{simd-iterator}<basic_simd>;
using const_iterator = \exposid{simd-iterator}<const basic_simd>;

constexpr iterator begin() noexcept { return {*this, 0}; }
constexpr const_iterator begin() const noexcept { return {*this, 0}; }
constexpr const_iterator cbegin() const noexcept { return {*this, 0}; }
constexpr default_sentinel_t end() const noexcept { return {}; }
constexpr default_sentinel_t cend() const noexcept { return {}; }
Copy link
Member

@Eisenwave Eisenwave Jun 23, 2025

Choose a reason for hiding this comment

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

Seeing that these are entirely defined within the synopsis, we should have some \indexlibrarymember macros above.

Same for basic_simd_mask.

Copy link
Member

Choose a reason for hiding this comment

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

We have \libmember for inline indexing inside codeblocks. "grep" for examples.

Copy link
Member Author

Choose a reason for hiding this comment

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

The members of simd-iterator do not get indexed, right? (because it's an exposition-only type? OTOH its members are public API.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, looking at some more examples of indexing, there's a lot of index macros missing for [simd]. I guess I should add all those as editorial commit after the motions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking at ranges.tex, the exposition-only iterators are fully indexed. So I guess I could do that as well.
I'll close this PR in favor of a single PR that includes all 4 simd motions ASAP.

@mattkretz mattkretz closed this Jun 25, 2025
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.

[2025-06 LWG Motion 11] P3480R6 std::simd is a range P3480 R5 std::simd is a range
3 participants