Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
rng_factory.hpp
Go to the documentation of this file.
1
14#ifndef MONTECARLO_RNG_FACTORY_HPP
15#define MONTECARLO_RNG_FACTORY_HPP
16
17#include <random>
18#include <cstdint>
19#include <optional>
20
21namespace mc {
22namespace rng {
23
24
30std::mt19937 make_engine(std::uint64_t stream_id = 0);
31
39std::mt19937 make_thread_engine(std::uint64_t stream_id = 0);
40
49std::mt19937 make_engine_with_seed(std::optional<std::uint32_t> base_seed,
50 std::uint64_t stream_id);
51
52} // namespace rng
53} // namespace mc
54
55#endif // MONTECARLO_RNG_FACTORY_HPP
std::mt19937 make_thread_engine(std::uint64_t stream_id)
Create a deterministic RNG engine for the current thread (OpenMP if available)
std::mt19937 make_engine_with_seed(std::optional< std::uint32_t > base_seed, std::uint64_t stream_id)
Create a deterministic RNG engine with explicit seed override (optional)
std::mt19937 make_engine(std::uint64_t stream_id)
Create a deterministic RNG engine for a specific stream.