MCPcopy Create free account
hub / github.com/TASEmulators/fceux / xoroshiro128plus_next

Function xoroshiro128plus_next

src/fceu.cpp:959–969  ·  view source on GitHub ↗

http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c

Source from the content-addressed store, hash-verified

957
958//http://vigna.di.unimi.it/xorshift/xoroshiro128plus.c
959u64 xoroshiro128plus_next() {
960 const u64 s0 = xoroshiro128plus_s[0];
961 u64 s1 = xoroshiro128plus_s[1];
962 const u64 result = s0 + s1;
963
964 s1 ^= s0;
965 xoroshiro128plus_s[0] = xoroshiro128plus_rotl(s0, 55) ^ s1 ^ (s1 << 14); // a, b
966 xoroshiro128plus_s[1] = xoroshiro128plus_rotl(s1, 36); // c
967
968 return result;
969}
970
971void FCEU_MemoryRand(uint8 *ptr, uint32 size, bool default_zero) {
972 int x = 0;

Callers 3

FCEU_MemoryRandFunction · 0.85
PowerNESFunction · 0.85
DECLFRFunction · 0.85

Calls 1

xoroshiro128plus_rotlFunction · 0.85

Tested by

no test coverage detected