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

P0543 R3 Saturation arithmetic #1218

Closed
jensmaurer opened this issue Mar 4, 2022 · 11 comments · Fixed by cplusplus/draft#6686
Closed

P0543 R3 Saturation arithmetic #1218

jensmaurer opened this issue Mar 4, 2022 · 11 comments · Fixed by cplusplus/draft#6686
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. size - small paper size estimate
Milestone

Comments

@jensmaurer
Copy link
Member

P0543R0 Saturation arithmetic (Jens Maurer)

@jensmaurer jensmaurer added the SG6 Numerics label Mar 4, 2022
@mattkretz
Copy link
Collaborator

minutes from Kona '17

@mattkretz
Copy link
Collaborator

D0543R1: Saturation arithmetic

2022-03-31 SG6 Telecon Minutes

Chair: Matthias Kretz

Champion: Jens Maurer

Minute Taker: John McFarlane

Summary

SG6 didn't have quorum. We discussed the paper and its context and gave feedback
on strengthening the paper for LEWG review. The paper will be revised with the
given feedback, a draft circulated on the SG6 reflector, and if no objections
are raised, the published paper will address LEWG.

Polls

none

@mattkretz mattkretz added the needs-revision Paper needs changes before it can proceed label May 2, 2022
@wg21bot
Copy link
Collaborator

wg21bot commented May 24, 2022

P0543R1 Saturation arithmetic (Jens Maurer)

@wg21bot wg21bot removed the needs-revision Paper needs changes before it can proceed label May 24, 2022
@wg21bot wg21bot added this to the 2022-telecon milestone May 24, 2022
@mattkretz
Copy link
Collaborator

No objections were raised. SG6 is happy with the paper. Forwarding to LEWG.

@mattkretz mattkretz added LEWG Library Evolution and removed SG6 Numerics labels May 24, 2022
@brycelelbach brycelelbach added SG6 Numerics size - small paper size estimate B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 IS Ship vehicle: IS C++26 Targeted at C++26 ready-for-library-evolution-mailing-list-review This paper needs to be discussed on the Library Evolution mailing list and removed SG6 Numerics labels Jun 19, 2022
@brycelelbach
Copy link

brycelelbach commented Jun 19, 2022

@inbal2l @cor3ntin do a motion to send this paper directly to electronic polling for C++26.

@brycelelbach brycelelbach added ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review and removed ready-for-library-evolution-mailing-list-review This paper needs to be discussed on the Library Evolution mailing list labels Jun 21, 2022
@brycelelbach brycelelbach added ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll and removed ready-for-library-evolution-meeting-review This paper needs to be discussed at a Library Evolution meeting scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review labels Aug 3, 2022
@brycelelbach
Copy link

2022-08-02 Library Evolution Telecon

P0543R1: Saturation arithmetic

2022-08-02 Library Evolution Telecon Minutes

Chair: Bryce Adelstein Lelbach

Minute Taker: Ben Craig

Champion: Jens Maurer

Start: 2022-08-02 11:50 Eastern

Does this paper have:

  • Examples?
    • Yes.
  • Field experience?
    • Implementation experience?
      • Yes, in a private codebase, in OpenCL, and in some form in GCC.
    • Usage experience?
      • Yes, in a private codebase, in OpenCL, and in some form in GCC.
    • Deployment experience?
      • Yes, in a private codebase, in OpenCL, and in some form in GCC.
  • Performance considerations?
    • Yes.
  • Discussion of prior art?
    • Yes. The paper talks about the platforms where this is available.
  • Wording?
    • Yes.
  • Feature test macro?
    • Yes.
  • Freestanding?
    • Needs to be added.

Open Questions:

  • Should we have saturating integer types?
  • Should we have a std::sat_plus function object?
  • Can these be functions be customized?
  • Which header should this go in?
  • What names should these functions have?
  • Has this been proposed to the C Committee?

POLL: Saturation arithmetic functions should be customization point objects (CPOs).

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
1 1 3 8 2

Attendance: 19

# of Authors: 1

Author Position: WA

Outcome: Weak consensus against.

POLL: Change the names of the saturation arithmetic functions in P0543R1.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
1 0 3 9 2

Attendance: 19

# of Authors: 1

Author Position: WA

Outcome: Consensus against.

SF: I'd like it to be spelled saturated_*, because people may not know what sat means.

POLL: Put the saturation arithmetic function in <numeric>.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
5 7 4 1 0

Attendance: 19

# of Authors: 1

Author Position: WF

Outcome: Strong consensus in favor.

WA: Smaller headers make it easier to include less things.

POLL: Modify P0543R1 (Saturation Arithmetic) by changing the header to <numeric> and marking the functions as freestanding, and then send the revised paper to Library for C++26 classified as B3 - Addition.

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
5 9 1 1 0

Attendance: 19

# of Authors: 1

Author Position: WF

Outcome: Strong consensus in favor.

WA: I was hoping for some customization and naming improvements.

End: 12:29

Summary

This paper proposes new math functions for integer saturating arithmetic. On many platforms, these operations can be implemented without branches.

Some expressed a desire for additional facilities, such as a function objecti n the style of std::plus or new integer types. It was pointed out that these are intended to be low-level building blocks, and that such facilities could be added later.

We also discussed the customizability of these functions. Some wanted to use newer mechanisms, such as customization point objects, to make these functions fully customizable. The author and others believed that these functions should follow the form and function of existing math functions, such as those in <cmath> and gcd, lcm, and midpoint.

We reviewed the names of the functions, which we approved of, and discussed which header they should live in, settling on <numeric>.

Next Steps

Modify P0543R1 (Saturation Arithmetic) by changing the header to <numeric> and marking the functions as freestanding, and then conduct an electronic poll to send the revised paper to Library for C++26 classified as B3 - Addition.

@wg21bot
Copy link
Collaborator

wg21bot commented Sep 22, 2022

P0543R2 Saturation arithmetic (Jens Maurer)

@brycelelbach brycelelbach added the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Sep 23, 2022
@brycelelbach brycelelbach added LWG Library and removed LEWG Library Evolution ready-for-library-evolution-electronic-poll This paper needs to undergo a Library Evolution electronic poll labels Nov 8, 2022
@brycelelbach brycelelbach removed the scheduled-for-library-evolution This paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review label Nov 8, 2022
@cor3ntin
Copy link

cor3ntin commented Nov 8, 2022

2022-10 Library Evolution Electronic Poll Outcomes

Send [P0543R2] Saturation Arithmetic to Library Working Group for C++26, classified as an addition ([P0592R4] bucket 3 item)..

Strongly Favor Weakly Favor Neutral Weakly Against Strongly Against
4 11 0 1 0

Outcome consensus in favor.

@JeffGarland JeffGarland added the tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. label May 31, 2023
@JeffGarland
Copy link
Member

JeffGarland commented May 31, 2023

LWG reviewed and approved for C++26 pending outcome of noexcept discussion for div.

https://wiki.edg.com/bin/view/Wg21telecons2023/P0543-20230531

poll: put P0543r3 into C++26?

F A N
10 0 0

@JeffGarland JeffGarland added lwg-future-plenary ready to go to plenary but working draft isn't open so we are waiting and removed tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. labels Jun 15, 2023
@jwakely
Copy link
Member

jwakely commented Jul 19, 2023

LWG reviewed an updated P0543R3 today and re-approved it for C++26.

poll: put P0543r3 into C++26?

F A N
9 0 0

@wg21bot
Copy link
Collaborator

wg21bot commented Jul 21, 2023

P0543R3 Saturation arithmetic (Jens Maurer)

@wg21bot wg21bot changed the title P0543 Saturation arithmetic P0543 R3 Saturation arithmetic Jul 21, 2023
@JeffGarland JeffGarland added tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. and removed lwg-future-plenary ready to go to plenary but working draft isn't open so we are waiting labels Jul 26, 2023
@inbal2l inbal2l added plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. and removed tentatively-ready-for-plenary Reviewed between meetings; ready for a vote. labels Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B3 - addition Bucket 3 as described by P0592: material that is not mentioned in P0592 C++26 Targeted at C++26 IS Ship vehicle: IS LWG Library plenary-approved Papers approved for inclusion in their target vehicle by plenary vote. size - small paper size estimate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants