Lines Matching refs:state
116 static void seed_random(uint32_t* state) {
119 state[i] = FLAG_random_seed;
124 state[i] = val;
126 state[i] = random();
133 static uint32_t random_base(uint32_t* state) {
136 if (state[0] == 0) seed_random(state);
138 // Mix the bits. Never replaces state[i] with 0 if it is nonzero.
139 state[0] = 18273 * (state[0] & 0xFFFF) + (state[0] >> 16);
140 state[1] = 36969 * (state[1] & 0xFFFF) + (state[1] >> 16);
142 return (state[0] << 14) + (state[1] & 0x3FFFF);
166 // purposes. So, we keep a different state to prevent informations