| 1 | #include "sfc64.h" |
| 2 | |
| 3 | extern void sfc64_set_seed(sfc64_state *state, uint64_t *seed) { |
| 4 | /* Conservatively stick with the original formula. With SeedSequence, it |
| 5 | * might be fine to just set the state with 4 uint64s and be done. |
| 6 | */ |
| 7 | int i; |
| 8 | |
| 9 | state->s[0] = seed[0]; |
| 10 | state->s[1] = seed[1]; |
| 11 | state->s[2] = seed[2]; |
| 12 | state->s[3] = 1; |
| 13 | |
| 14 | for (i=0; i<12; i++) { |
| 15 | (void)sfc64_next(state->s); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | extern void sfc64_get_state(sfc64_state *state, uint64_t *state_arr, int *has_uint32, |
| 20 | uint32_t *uinteger) { |
nothing calls this directly
no test coverage detected