Project Alice
Loading...
Searching...
No Matches
prng.hpp
Go to the documentation of this file.
1
#pragma once
2
3
namespace
sys
{
4
struct
state
;
5
}
6
7
namespace
rng
{
8
9
struct
random_pair
{
10
uint64_t
high
;
11
uint64_t
low
;
12
};
13
14
uint64_t
get_random
(
sys::state
const
& state,
uint32_t
value_in);
// try to populate as many bits of value_in as you can
15
random_pair
get_random_pair
(
sys::state
const
& state,
uint32_t
value_in);
// each call natively generates 128 random bits anyways
16
uint64_t
get_random
(
sys::state
const
& state,
uint32_t
value_in_hi,
uint32_t
value_in_lo);
17
random_pair
get_random_pair
(
sys::state
const
& state,
uint32_t
value_in_hi,
uint32_t
value_in_lo);
18
uint32_t
reduce
(
uint32_t
value_in,
uint32_t
upper_bound);
19
20
}
// namespace rng
game_scene::borders_granularity::state
@ state
rng
Definition:
prng.cpp:6
rng::get_random_pair
random_pair get_random_pair(sys::state const &state, uint32_t value_in)
Definition:
prng.cpp:26
rng::reduce
uint32_t reduce(uint32_t value_in, uint32_t upper_bound)
Definition:
prng.cpp:46
rng::get_random
uint64_t get_random(sys::state const &state, uint32_t value_in)
Definition:
prng.cpp:8
sys
Definition:
constants.hpp:4
uint32_t
uint uint32_t
Definition:
openclfeatures.h:85
uint64_t
ulong uint64_t
Definition:
openclfeatures.h:84
rng::random_pair
Definition:
prng.hpp:9
rng::random_pair::low
uint64_t low
Definition:
prng.hpp:11
rng::random_pair::high
uint64_t high
Definition:
prng.hpp:10
sys::state
Definition:
system_state.hpp:472
src
common_types
prng.hpp
Generated by
1.9.5