Skip to content

[oneMath][RNG] Added random engine adaptors#616

Merged
andreyfe1 merged 6 commits intouxlfoundation:mainfrom
andreyfe1:onemath_engine_adaptor
Apr 1, 2025
Merged

[oneMath][RNG] Added random engine adaptors#616
andreyfe1 merged 6 commits intouxlfoundation:mainfrom
andreyfe1:onemath_engine_adaptor

Conversation

@andreyfe1
Copy link
Copy Markdown
Contributor

New engine adaptor is added. It wraps a random engine to add extra functionality: to query how many random numbers were taken from an engine during the generate call.

Feel free to provide your feedback.

Signed-off-by: Fedorov, Andrey <andrey.fedorov@intel.com>
====================

``count_engine_adaptor`` is a random number engine adaptor that counts how many
random numbers were taken from an engine during the ``generate`` call.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify what is meant by random number here: if it is 32-bit generator output or something else? As different engines may provide different bits output.
Possible suggestions:

  • how many times 32 random bits were taken from the engine
  • how many times the random engine state is advanced
  • introduce public operator() or generate() for engine and count its calls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the option how many times 32 random bits were taken from the engine or how many times the random engine state is advanced, but still don't see the best option to write. Will think about it

@andreyfe1 andreyfe1 merged commit 5cef0ab into uxlfoundation:main Apr 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants