CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::RingRand Struct Reference

Deterministic xorshift64* — same sequence on every platform, unlike rand(). More...

Public Member Functions

 RingRand (uint64 seed)
uint64 next ()
uint32 below (uint32 n)
bool chance (uint32 pct)

Public Attributes

uint64 s

Detailed Description

Deterministic xorshift64* — same sequence on every platform, unlike rand().

Definition at line 37 of file ProcessMemoryFuzz.cpp.

Constructor & Destructor Documentation

◆ RingRand()

cmlabs::RingRand::RingRand ( uint64 seed)
inline

Definition at line 39 of file ProcessMemoryFuzz.cpp.

References s.

Member Function Documentation

◆ below()

uint32 cmlabs::RingRand::below ( uint32 n)
inline

Definition at line 41 of file ProcessMemoryFuzz.cpp.

References next().

Referenced by chance(), and cmlabs::RingRunSeed().

◆ chance()

bool cmlabs::RingRand::chance ( uint32 pct)
inline

Definition at line 42 of file ProcessMemoryFuzz.cpp.

References below().

Referenced by cmlabs::RingRunSeed().

◆ next()

uint64 cmlabs::RingRand::next ( )
inline

Definition at line 40 of file ProcessMemoryFuzz.cpp.

References s.

Referenced by below().

Member Data Documentation

◆ s

uint64 cmlabs::RingRand::s

Definition at line 38 of file ProcessMemoryFuzz.cpp.

Referenced by next(), and RingRand().


The documentation for this struct was generated from the following file: