MCPcopy Create free account
hub / github.com/numpy/numpy / pcg_cm_srandom_r

Function pcg_cm_srandom_r

numpy/random/src/pcg64/pcg64.h:236–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235
236static inline void pcg_cm_srandom_r(pcg_state_setseq_128 *rng, pcg128_t initstate, pcg128_t initseq) {
237 rng->state = PCG_128BIT_CONSTANT(0ULL, 0ULL);
238 rng->inc.high = initseq.high << 1u;
239 rng->inc.high |= initseq.low >> 63u;
240 rng->inc.low = (initseq.low << 1u) | 1u;
241 pcg_cm_step_r(rng);
242 rng->state = pcg128_add(rng->state, initstate);
243 pcg_cm_step_r(rng);
244}
245
246static inline uint64_t pcg_cm_random_r(pcg_state_setseq_128* rng)
247{

Callers

nothing calls this directly

Calls 3

PCG_128BIT_CONSTANTFunction · 0.85
pcg_cm_step_rFunction · 0.85
pcg128_addFunction · 0.85

Tested by

no test coverage detected