-
Notifications
You must be signed in to change notification settings - Fork 114
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
[RNG] Added experimental support of Philox counter-based PRNG #1785
Conversation
…neapi-src/oneDPL into dev/etyulene/eng_philox_engine
include/oneapi/dpl/internal/random_impl/counter_based_engines_stuff.h
Outdated
Show resolved
Hide resolved
include/oneapi/dpl/internal/random_impl/counter_based_engines_stuff.h
Outdated
Show resolved
Hide resolved
include/oneapi/dpl/internal/random_impl/counter_based_engines_stuff.h
Outdated
Show resolved
Hide resolved
include/oneapi/dpl/internal/random_impl/counter_based_engines_stuff.h
Outdated
Show resolved
Hide resolved
test/xpu_api/random/conformance_tests/common_for_conformance_tests.hpp
Outdated
Show resolved
Hide resolved
* Uglified word_mask
* Aligned the number of _ in templates * Corrected max method(added -1) * Scalar generate_internal() is now working in-place without extra memory buffer * Applied mask in mulhilo calculations * Added necessary headers
* small corrections in philox_uniform_real_distribution_test.pass.cpp
* Make philox eqation more obvious in the code
Co-authored-by: Alina Elizarova <[email protected]>
static constexpr ::std::size_t word_count = _n; | ||
static constexpr ::std::size_t round_count = _r; | ||
|
||
static_assert(_n == 2 || _n == 4, "_n must be 2 or 4"); |
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.
"parameter n must be 2 or 4"
parameter name is just aligned with spec
* Overflow testing was added for w!=32 and w!=64
@aelizaro , the PR is ready for the final review, I've pushed all planned commits here. |
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.
Thank you for the huge work @ElenaTyuleneva!
The changes looks good to me.
Reviewed offline with @rarutyun. All the major design comments are resolved; we agreed to merge the feature as experimental. The algorithmic part of the implementation wasn't checked too thoroughly, but it relies on good test coverage, which is done in this PR.
C++ draft proposal was used as a design for public API - p2075r6.pdf, the latest correction by the time of PR creation is issue4134
Things to make before the merge: