[PATCH v2] libstdc++: implement Philox Engine [PR119794]
Patrick Palka
ppalka@redhat.com
Tue Jun 10 01:16:41 GMT 2025
Hi,
On Thu, 22 May 2025, 1nfocalypse wrote:
> Implements Philox Engine (P2075R6) and associated tests.
>
> v2 corrects a multiline comment left in error in serialize.cc, and additionally corrects a bug hidden by said comment, where the stream was given the output of 'y()' instead of 'y', causing state to be
> incorrectly passed. Lastly, it fixes numerous whitespace issues found in the original patch. My apologies for not noticing prior to the submission of the original patch, which can now be disregarded.
>
> To reiterate from the original email, the template unpacking functions are placed in a private classifier prior to the public one due to an ordering bug, where in order to function correctly, they must be
> placed prior to the bulk of the header. This is counter to the style recommendations, but I was unable to obtain functionality any other way. Additionally, while SIMD instructions are not utilized, and I do
> not think that they would integrate well with how the generator's state is currently handled, some structure choices could be made that may make them of interest.
>
> Lastly, since word width can be specified, and thus atypical, maximum value is calculated via some bit manipulation rather than numeric_limits, since the specified width may differ from the width of the type
> used.
Thanks for the nice patch!
Just to confirm, do you have a copyright assignment for
GCC in place (or are covered by a corporate assignment)?
If not, please complete that process, or contribute under the DCO
terms, see https://gcc.gnu.org/contribute.html#legal
Please don't put copyright and license headers on new tests at all,
unless they really are copyright FSF, and really do contain something
original and copyrightable (which I don't think applies here).
This is documented at
https://gcc.gnu.org/onlinedocs/libstdc++/manual/test.html#test.new_tests
If the patch is being contributed under the DCO, please resubmit it
with a Signed-off-by tag as per the first link :)
We hope to do a full review of the patch soon.
>
> Built/tested on x86_64-linux-gnu.
>
> * 1nfocalypse
>
>
More information about the Libstdc++
mailing list