Variable utils::rngStateWidth

Variable Documentation

constexpr size_t utils::rngStateWidth = 128

Fixed-width buffer type for a serialized rng state.

A pcg64 engine’s stream insertion operator writes its full state as three 128-bit values – multiplier, increment, and state – in decimal, separated by single spaces. Since 2^128 - 1 has 39 decimal digits, that text is at most 3*39 + 2 = 119 characters; 128 bytes gives headroom for that plus a null terminator. Being a fixed-width POD type, RngState (unlike a std::string) can be written to disk or passed via MPI as a plain byte buffer. Width, in bytes, of RngState