What is it?
RandomIterator is a small header-only library providing iterators pointing to streams of pseudorandom numbers. The library operates using lazy-evaluation and is intented for usage on multi-thread calculations.
RandomIterator deploys state-of-the-art counter-based pseudorandom numbers generators from Random123: library and a pair of native generators based Squares: algorithm, together with TBB: iterators, exposing a concise, lightweght and thread-safe API capable of handling up to \(2^{32}\) streams of pseudorandom numbers, with lenght of \(2^{64}\).
Main features
Five primary generators: Philox, ARS and Threefry from Random123 and Squares3 and Squares4, which are natively implemented.
Completely thread-safe.
Compatibility with all C++ distributions defined in the standard library.
For each seed, the
random_iterator::Stream<Distribution, Engine>manages up to \(2^{32}\) streams, with length \({2}^{64}\).When instantiated to produce 64bit output, like double, each stream can provide up to 128EB of data.
Installation and requirements
RandomIterator iterator is a header-only library with no dependences.
The Latest Version
Code of RandomIterator is maintened at KIT Gitlab repository
Documentation
Licensing
RandomIterator is released under the 3-Clause BSD License (SPDX short identifier: BSD-3-Clause): <https://opensource.org/license/BSD-3-clause>. Please see the file called LICENSE.
Contacting the developers
Here’s what you should do if you need help or would like to contribute:
If you found a bug or what to ask any question, use GitLab issues.
If you have an idea, suggestion or whatever, use GitHub issues.
If you want to contribute, submit a pull request.
Acknowledgement
The authors acknowledge support by the High Performance and Cloud Computing Group at the Zentrum für Datenverarbeitung of the University of Tübingen, the state of Baden- Württemberg through bwHPC and the German Research Foundation (DFG) through grant no. INST 37/935-1 FUGG.