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

[2025-02 LWG Motion 11] P3430R3 simd issues: explicit, unsequenced, identity-element position, and members of disabled simd #7687

Merged
merged 1 commit into from
Mar 15, 2025

Conversation

mattkretz
Copy link
Member

Fixes #7670
Also fixes cplusplus/papers#2097

@mattkretz mattkretz force-pushed the motions-2025-02-lwg-11 branch from 0189a86 to 34330fe Compare February 17, 2025 16:31
Vectorization-unsafe\iref{algorithms.parallel.defns} standard library functions
may not be invoked by \tcode{gen}.
\tcode{gen} is invoked exactly once for each $i$.
\tcode{gen} is invoked exactly once for each $i$, in increasing order of $i$.
Copy link
Contributor

Choose a reason for hiding this comment

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

This wording is hand-wavy; is that ok because it's just a remark? Same for this wording added elsewhere...

Copy link
Member Author

Choose a reason for hiding this comment

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

What is hand-wavy about it? And what would you say instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

What is "each $i$"? The closest wording prior to this paper is "if $N = 0$ or if for each $i$ where $0 \le i < N$ in increasing order"

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 preceding paragraph says:

Initializes the $i^\text{th}$ element with
static_cast<value_type>(gen(integral_constant<simd-size-type, i>())) for all $i$ in the range of [0,size()).

Doesn't that sufficiently explain what "each $i$" means? (And there's no $N = 0$ case to consider here.)

@tkoeppe tkoeppe force-pushed the motions-2025-02-lwg-11 branch from 34330fe to 0570631 Compare March 15, 2025 14:48
@tkoeppe tkoeppe merged commit 103af7a into cplusplus:main Mar 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants