Skip to content

P3111R8 Atomic Reduction Operations #8025

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

jensmaurer
Copy link
Member

@jensmaurer jensmaurer added this to the post-2025-06 milestone Jun 27, 2025
\end{note}
For \tcode{store_max} and \tcode{store_min},
the maximum and minimum computation is performed
as if by \tcode{max} and \tcode{min} algorithms\iref{alg.min.max}, respectively,
Copy link
Member

Choose a reason for hiding this comment

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

Might want to say "as if by the max and min algorithms", but I guess, either is technically okay.

Copy link
Member Author

Choose a reason for hiding this comment

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

This phrasing is copied from fetch_min/max. I'd suggest to make a separate pull request after the motions merge.

@@ -4740,6 +5050,35 @@
constexpr @\placeholdernc{integral-type}@ fetch_min( @\placeholdernc{integral-type}@,
memory_order = memory_order::seq_cst) noexcept;

void store_add(@\placeholdernc{integral-type}@,
Copy link
Member

Choose a reason for hiding this comment

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

Am I unfamiliar with something, or why is this using placeholder instead of exposid? According to the comments in macros.tex, placeholder is for placeholders in the middle of identifiers, like N in intN_t, and integral-type really just looks like an exposition-only type to me.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a meta-placeholder, because we stamp out a full specialization for each integer type. There is an implied "foreach" around this subclause. exposid isn't like that.

Comment on lines +5528 to +5529
\pnum
\begin{itemize}
Copy link
Member

Choose a reason for hiding this comment

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

Missing \remarks here. I actually happened to be in LWG at the time we've looked at this wording and pointed out it's weird to me that we have two separate Remarks specifications in the place, but it was not seen as an issue.

@jwakely having a second Remarks here is intentional, right?

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 automatic checking won't allow duplicate elements.

Copy link
Member

Choose a reason for hiding this comment

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

Then we can live with just one

@jensmaurer jensmaurer force-pushed the motions-2025-06-lwg-28 branch from 722505e to 02fe942 Compare July 10, 2025 21:34
@jensmaurer jensmaurer force-pushed the motions-2025-06-lwg-28 branch from 02fe942 to 23eada3 Compare July 10, 2025 21:48
@jensmaurer jensmaurer requested a review from Eisenwave July 11, 2025 10:32
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.

I'm fine with merging as is, even though it feels like there are some loose threads here. Nothing we couldn't figure out after motions.

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 28] P3111R8 Atomic Reduction Operations P3111 R6 Atomic Reduction Operations
3 participants