-
Notifications
You must be signed in to change notification settings - Fork 767
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 13] P2933R4 Extend <bit> header function with overloads for std::simd #7689
Conversation
407e8b9
to
7eb0823
Compare
Commit descriptions should not have "[2025-02 LWG Motion 13] " in front. See https://github.com/cplusplus/draft/wiki/Commit-message-format#commits-from-committee-papers Feel free to fix + force-push the other ones, too. (No other changes in that push, please.) Add-on repairs for the contents should be "fixup: ..." commits, not force-pushes. |
7eb0823
to
38d1808
Compare
@@ -16736,6 +16741,43 @@ | |||
template<@\exposconcept{math-floating-point}@ V> | |||
@\exposid{deduced-simd-t}@<V> | |||
sph_neumann(const rebind_simd_t<unsigned, @\exposid{deduced-simd-t}@<V>>& n, const V& x); | |||
|
|||
// \ref{simd.bit}, Bit manipulation | |||
template<@\exposconcept{simd-type}@ V> constexpr V byteswap(const V& v) noexcept; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: Why this "simd-type" formulation instead of taking a suitably-parameterized std::basic_simd
parameter type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I asked that question in LWG but I don't recall an answer. What difference does it make (other than style)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None, as far as I know; that's why I'm asking. It just feels a bit backwards to say "this function takes arguments of any type, except satisfaction checking of constraints will then check whether we have a specialization of X" instead of "this function takes a specialization of X".
(Maybe compiling is faster one way or the other.)
09229fb
to
7baae55
Compare
7baae55
to
868ad5d
Compare
Fixes #7672
Also fixes cplusplus/papers#1622