Loading...
Searching...
No Matches
xoroshiro128p.h File Reference
`#include <stdint.h>`
Include dependency graph for xoroshiro128p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions

static uint64_t | rotl (const uint64_t x, const int k)
| rotating left shift helper According to the original authors, this will on most platforms reduce to a single instruction
static uint64_t | xoroshiro128p_next (uint64_t *state)
| generate the next random number and update the state. This is the workhorse, here!
static void | xoroshiro128p_jump (uint64_t *state)
| Advance the internal state by 2^64 steps; useful when coordinating multiple independent RNGs This is the jump function for the generator. It is equivalent to 2^64 calls to next(); it can be used to generate 2^64 non-overlapping subsequences for parallel computations.
static uint64_t | splitmix64_next (uint64_t *state)
| step of the SPLITMIX64 RNG; only used internally for seeding This RNG isn't as good as XOROSHIRO128+, so it's only used to initialize a 128 bit state from a seed.
static void | xoroshiro128p_seed (uint64_t *state, const uint64_t seed)
| Seed the 128 bit state from a 64 bit seed.

## Function Documentation

## rotl()

uint64_t rotl | ( | const uint64_t | x,
|  | const int | k )

inline static

rotating left shift helper According to the original authors, this will on most platforms reduce to a single instruction

Referenced by xoroshiro128p_next().

## splitmix64_next()

uint64_t splitmix64_next | ( | uint64_t * | state | ) |

inline static

step of the SPLITMIX64 RNG; only used internally for seeding This RNG isn't as good as XOROSHIRO128+, so it's only used to initialize a 128 bit state from a seed.

Referenced by xoroshiro128p_seed().

## xoroshiro128p_jump()

void xoroshiro128p_jump | ( | uint64_t * | state | ) |

inline static

Advance the internal state by 2^64 steps; useful when coordinating multiple independent RNGs This is the jump function for the generator. It is equivalent to 2^64 calls to next(); it can be used to generate 2^64 non-overlapping subsequences for parallel computations.

References xoroshiro128p_next().

Referenced by xoroshiro128p_seed().

## xoroshiro128p_next()

uint64_t xoroshiro128p_next | ( | uint64_t * | state | ) |

inline static

generate the next random number and update the state. This is the workhorse, here!

References rotl().

Referenced by gr::xoroshiro128p_prng::operator()(), and xoroshiro128p_jump().

## xoroshiro128p_seed()

void xoroshiro128p_seed | ( | uint64_t * | state,
|  | const uint64_t | seed )

inline static

Seed the 128 bit state from a 64 bit seed.

References splitmix64_next(), and xoroshiro128p_jump().

Referenced by gr::xoroshiro128p_prng::seed().