Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
Functions | Variables
mc::rng::detail Namespace Reference

Functions

std::uint64_t splitmix64_mix (std::uint64_t x)
 
std::uint64_t combine_seeds (std::uint64_t base_seed, std::uint64_t stream_id, std::uint64_t thread_id)
 
std::mt19937 create_mt19937 (std::uint64_t seed)
 Create mt19937 from a 64-bit seed.
 

Variables

std::atomic< std::uint32_t > g_global_seed {12345u}
 
std::atomic< bool > g_seed_initialized {false}
 

Function Documentation

◆ combine_seeds()

std::uint64_t mc::rng::detail::combine_seeds ( std::uint64_t  base_seed,
std::uint64_t  stream_id,
std::uint64_t  thread_id 
)
inline

Definition at line 36 of file rng_factory.cpp.

Here is the call graph for this function:

◆ create_mt19937()

std::mt19937 mc::rng::detail::create_mt19937 ( std::uint64_t  seed)
inline

Create mt19937 from a 64-bit seed.

Expands the 64-bit mixed seed into 8x 32-bit words deterministically. This feeds std::seed_seq with more material than just {lo, hi}.

Definition at line 55 of file rng_factory.cpp.

Here is the call graph for this function:

◆ splitmix64_mix()

std::uint64_t mc::rng::detail::splitmix64_mix ( std::uint64_t  x)
inline

Definition at line 29 of file rng_factory.cpp.

Variable Documentation

◆ g_global_seed

std::atomic<std::uint32_t> mc::rng::detail::g_global_seed {12345u}

Definition at line 9 of file rng_global.cpp.

◆ g_seed_initialized

std::atomic<bool> mc::rng::detail::g_seed_initialized {false}

Definition at line 12 of file rng_global.cpp.