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

Function pcg_setseq_128_srandom_r

numpy/random/src/pcg64/pcg64.h:174–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174static inline void pcg_setseq_128_srandom_r(pcg_state_setseq_128 *rng,
175 pcg128_t initstate,
176 pcg128_t initseq) {
177 rng->state = PCG_128BIT_CONSTANT(0ULL, 0ULL);
178 rng->inc.high = initseq.high << 1u;
179 rng->inc.high |= initseq.low >> 63u;
180 rng->inc.low = (initseq.low << 1u) | 1u;
181 pcg_setseq_128_step_r(rng);
182 rng->state = pcg128_add(rng->state, initstate);
183 pcg_setseq_128_step_r(rng);
184}
185
186static inline uint64_t
187pcg_setseq_128_xsl_rr_64_random_r(pcg_state_setseq_128 *rng) {

Callers

nothing calls this directly

Calls 3

PCG_128BIT_CONSTANTFunction · 0.85
pcg128_addFunction · 0.85
pcg_setseq_128_step_rFunction · 0.70

Tested by

no test coverage detected