| 234 | |
| 235 | |
| 236 | static 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 | |
| 246 | static inline uint64_t pcg_cm_random_r(pcg_state_setseq_128* rng) |
| 247 | { |
nothing calls this directly
no test coverage detected