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 13] P2933R4 Extend <bit> header function with overloads for std::simd #7689

Merged
merged 1 commit into from
Mar 15, 2025

Conversation

mattkretz
Copy link
Member

Fixes #7672
Also fixes cplusplus/papers#1622

@mattkretz mattkretz force-pushed the motions-2025-02-lwg-13 branch from 407e8b9 to 7eb0823 Compare February 17, 2025 16:21
@jensmaurer
Copy link
Member

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.

@mattkretz mattkretz force-pushed the motions-2025-02-lwg-13 branch from 7eb0823 to 38d1808 Compare February 17, 2025 16:30
@mattkretz mattkretz marked this pull request as ready for review February 17, 2025 16:34
@@ -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;
Copy link
Member

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?

Copy link
Member Author

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)?

Copy link
Member

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.)

@tkoeppe tkoeppe force-pushed the motions-2025-02-lwg-13 branch from 09229fb to 7baae55 Compare March 15, 2025 13:19
@tkoeppe tkoeppe force-pushed the motions-2025-02-lwg-13 branch from 7baae55 to 868ad5d Compare March 15, 2025 14:02
@tkoeppe tkoeppe merged commit 5afb6c7 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