PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | pg_prng_state |
Macros | |
#define | pg_prng_strong_seed(state) |
Typedefs | |
typedef struct pg_prng_state | pg_prng_state |
Functions | |
void | pg_prng_seed (pg_prng_state *state, uint64 seed) |
void | pg_prng_fseed (pg_prng_state *state, double fseed) |
bool | pg_prng_seed_check (pg_prng_state *state) |
uint64 | pg_prng_uint64 (pg_prng_state *state) |
uint64 | pg_prng_uint64_range (pg_prng_state *state, uint64 rmin, uint64 rmax) |
int64 | pg_prng_int64 (pg_prng_state *state) |
int64 | pg_prng_int64p (pg_prng_state *state) |
int64 | pg_prng_int64_range (pg_prng_state *state, int64 rmin, int64 rmax) |
uint32 | pg_prng_uint32 (pg_prng_state *state) |
int32 | pg_prng_int32 (pg_prng_state *state) |
int32 | pg_prng_int32p (pg_prng_state *state) |
double | pg_prng_double (pg_prng_state *state) |
double | pg_prng_double_normal (pg_prng_state *state) |
bool | pg_prng_bool (pg_prng_state *state) |
Variables | |
PGDLLIMPORT pg_prng_state | pg_global_prng_state |
#define pg_prng_strong_seed | ( | state | ) |
typedef struct pg_prng_state pg_prng_state |
bool pg_prng_bool | ( | pg_prng_state * | state | ) |
double pg_prng_double | ( | pg_prng_state * | state | ) |
Definition at line 268 of file pg_prng.c.
References xoroshiro128ss().
Referenced by check_log_duration(), computeIterativeZipfian(), doLog(), drandom(), explain_ExecutorStart(), geqo_rand(), get_normal_pair(), getExponentialRand(), getPoissonRand(), perform_spin_delay(), pg_prng_double_normal(), sampler_random_fract(), and StartTransaction().
double pg_prng_double_normal | ( | pg_prng_state * | state | ) |
Definition at line 290 of file pg_prng.c.
References M_PI, and pg_prng_double().
Referenced by drandom_normal(), and getGaussianRand().
void pg_prng_fseed | ( | pg_prng_state * | state, |
double | fseed | ||
) |
Definition at line 102 of file pg_prng.c.
References pg_prng_seed(), and UINT64CONST.
Referenced by geqo_set_seed(), and setseed().
int32 pg_prng_int32 | ( | pg_prng_state * | state | ) |
int32 pg_prng_int32p | ( | pg_prng_state * | state | ) |
Definition at line 254 of file pg_prng.c.
References xoroshiro128ss().
Referenced by create_and_test_bloom().
int64 pg_prng_int64 | ( | pg_prng_state * | state | ) |
Definition at line 173 of file pg_prng.c.
References xoroshiro128ss().
int64 pg_prng_int64_range | ( | pg_prng_state * | state, |
int64 | rmin, | ||
int64 | rmax | ||
) |
Definition at line 192 of file pg_prng.c.
References likely, PG_INT64_MAX, PG_INT64_MIN, pg_prng_uint64_range(), and val.
Referenced by int4random(), and int8random().
int64 pg_prng_int64p | ( | pg_prng_state * | state | ) |
Definition at line 182 of file pg_prng.c.
References UINT64CONST, and xoroshiro128ss().
void pg_prng_seed | ( | pg_prng_state * | state, |
uint64 | seed | ||
) |
Definition at line 89 of file pg_prng.c.
References pg_prng_seed_check(), and splitmix64().
Referenced by choose_dsm_implementation(), initialize_prng(), InitProcessGlobals(), initRandomState(), libpq_prng_init(), main(), permute(), pg_prng_fseed(), sampler_random_init_state(), set_random_seed(), setup_publisher(), and test_random().
bool pg_prng_seed_check | ( | pg_prng_state * | state | ) |
Definition at line 114 of file pg_prng.c.
References UINT64CONST, and unlikely.
Referenced by pg_prng_seed().
uint32 pg_prng_uint32 | ( | pg_prng_state * | state | ) |
Definition at line 227 of file pg_prng.c.
References xoroshiro128ss().
Referenced by _bt_findinsertloc(), acquire_sample_rows(), anl_init_selection_state(), anl_random_fract(), CatalogCacheCreateEntry(), choose_dsm_implementation(), dsm_create(), dsm_postmaster_startup(), ExecInitSampleScan(), generate_object_name(), InitProcessGlobals(), make_main_region_dsm_handle(), reservoir_init_selection_state(), and test_huge_distances().
uint64 pg_prng_uint64 | ( | pg_prng_state * | state | ) |
Definition at line 134 of file pg_prng.c.
References xoroshiro128ss().
Referenced by bt_check_every_level(), initRandomState(), main(), permute(), and test_random().
uint64 pg_prng_uint64_range | ( | pg_prng_state * | state, |
uint64 | rmin, | ||
uint64 | rmax | ||
) |
Definition at line 144 of file pg_prng.c.
References likely, pg_leftmost_one_pos64(), range(), val, and xoroshiro128ss().
Referenced by array_shuffle_n(), geqo_randint(), GetPermutation(), getrand(), permute(), pg_prng_int64_range(), pqConnectOptions2(), PQconnectPoll(), random_var(), SetTempTablespaces(), spgdoinsert(), test_pattern(), testdelete(), and testfindltgt().
|
extern |
Definition at line 34 of file pg_prng.c.
Referenced by _bt_findinsertloc(), acquire_sample_rows(), anl_init_selection_state(), anl_random_fract(), array_shuffle_n(), bt_check_every_level(), CatalogCacheCreateEntry(), check_log_duration(), create_and_test_bloom(), dsm_create(), dsm_postmaster_startup(), ExecInitSampleScan(), explain_ExecutorStart(), get_normal_pair(), GetPermutation(), gistchoose(), InitProcessGlobals(), main(), make_main_region_dsm_handle(), perform_spin_delay(), prepare_buf(), reservoir_init_selection_state(), SetTempTablespaces(), spgdoinsert(), StartTransaction(), test_huge_distances(), test_pattern(), testdelete(), and testfindltgt().