|
TraceMaker
C++ API of the engine
|
A random stream identified by (seed, stage, item). More...
#include <core/rng.hpp>
Public Member Functions | |
| TM_HD constexpr | RngStream (std::uint64_t seed, std::uint32_t stage, std::uint64_t item) |
| TM_HD constexpr U32x4 | block (std::uint64_t n) const |
| Four 32-bit values for block n of this stream. | |
| TM_HD constexpr std::uint64_t | u64 (std::uint64_t n) const |
| Draw n as a 64-bit value. | |
| TM_HD constexpr double | uniform (std::uint64_t n) const |
| Draw n as a double in [0, 1) with 53 random bits. | |
A random stream identified by (seed, stage, item).
Draw number n is a pure function of the stream and n, so any thread or GPU lane can jump to any draw without coordination.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |