Ranx is a next-generation parallel algorithmic (pseudo) random number generator available as both a utility, as well as a modern header-only C++ library supporting OpenMP, CUDA, ROCm and oneAPI.
As a library, Ranx provides alternatives to STLโs std::generate() family of algorithms that exclusively designed for parallel random number generation on CPUs and GPUs.
Features at a Glance ๐ฎยถ
Ranx uses block splitting and leapfrog algorithms for parallel random number generation on CPU and GPU, respectively.
๐ฒ Play fair
Using the same seed, Ranx always generates the same sequence, independent of the number of parallel threads and the underlying hardware on all platforms.
Key Features ๐ฅยถ
- ๐ฅ๏ธ Multiplatform (Linux, macOS, Windows)
- ๐ ๏ธ Support four target APIs (OpenMP, CUDA, ROCm, oneAPI)
- ๐ฒ Play fair on all supported platforms
- ๐ฅ No dependencies
- ๐๏ธ Header-only
- ๐ฑ Include PCG family as engine
- ๐ Include 32 distributions provided by TRNG library
- ๐ฅ Easily integrates with existing libraries and code (via CMake configs)
- ๐งช Include unit tests using
Catch2 - ๐ Include benchmarks using
Google Benchmark - ๐ Well documented