ROOT-Sim core  3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
Macros
xoroshiro.h File Reference

Xoroshiro RNG support functions. More...

#include <stdint.h>
Include dependency graph for xoroshiro.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define rotl(x, k)   (((x) << (k)) | ((x) >> (64 - (k))))
 
#define random_u64(rng_s)
 

Detailed Description

Xoroshiro RNG support functions.

Xoroshiro RNG support functions.

Macro Definition Documentation

◆ random_u64

#define random_u64 (   rng_s)
Value:
__extension__({ \
const uint64_t __res = rotl((rng_s)[1] * 5, 7) * 9; \
const uint64_t __t = (rng_s)[1] << 17; \
\
(rng_s)[2] ^= (rng_s)[0]; \
(rng_s)[3] ^= (rng_s)[1]; \
(rng_s)[1] ^= (rng_s)[2]; \
(rng_s)[0] ^= (rng_s)[3]; \
(rng_s)[2] ^= __t; \
(rng_s)[3] = rotl((rng_s)[3], 45); \
\
__res; \
})