Lines Matching refs:state
47 const uint64_t r = rotl(s->state[1] * 5, 7) * 9; in generate_state()
48 const uint64_t t = s->state[1] << 17; in generate_state()
50 s->state[2] ^= s->state[0]; in generate_state()
51 s->state[3] ^= s->state[1]; in generate_state()
52 s->state[1] ^= s->state[2]; in generate_state()
53 s->state[0] ^= s->state[3]; in generate_state()
55 s->state[2] ^= t; in generate_state()
57 s->state[3] = rotl(s->state[3], 45); in generate_state()
62 static inline void jump(php_random_status_state_xoshiro256starstar *state, const uint64_t *jmp) in jump() argument
69 s0 ^= state->state[0]; in jump()
70 s1 ^= state->state[1]; in jump()
71 s2 ^= state->state[2]; in jump()
72 s3 ^= state->state[3]; in jump()
75 generate_state(state); in jump()
79 state->state[0] = s0; in jump()
80 state->state[1] = s1; in jump()
81 state->state[2] = s2; in jump()
82 state->state[3] = s3; in jump()
85 …om_xoshiro256starstar_seed256(php_random_status_state_xoshiro256starstar *state, uint64_t s0, uint… in php_random_xoshiro256starstar_seed256() argument
87 state->state[0] = s0; in php_random_xoshiro256starstar_seed256()
88 state->state[1] = s1; in php_random_xoshiro256starstar_seed256()
89 state->state[2] = s2; in php_random_xoshiro256starstar_seed256()
90 state->state[3] = s3; in php_random_xoshiro256starstar_seed256()
93 …_random_xoshiro256starstar_seed64(php_random_status_state_xoshiro256starstar *state, uint64_t seed) in php_random_xoshiro256starstar_seed64() argument
102 php_random_xoshiro256starstar_seed256(state, s[0], s[1], s[2], s[3]); in php_random_xoshiro256starstar_seed64()
105 static php_random_result generate(void *state) in generate() argument
109 .result = generate_state(state), in generate()
113 static zend_long range(void *state, zend_long min, zend_long max) in range() argument
117 .state = state, in range()
121 static bool serialize(void *state, HashTable *data) in serialize() argument
123 php_random_status_state_xoshiro256starstar *s = state; in serialize()
127 ZVAL_STR(&t, php_random_bin2hex_le(&s->state[i], sizeof(uint64_t))); in serialize()
134 static bool unserialize(void *state, HashTable *data) in unserialize() argument
136 php_random_status_state_xoshiro256starstar *s = state; in unserialize()
149 if (!php_random_hex2bin_le(Z_STR_P(t), &s->state[i])) { in unserialize()
165 PHPAPI void php_random_xoshiro256starstar_jump(php_random_status_state_xoshiro256starstar *state) in php_random_xoshiro256starstar_jump() argument
168 jump(state, jmp); in php_random_xoshiro256starstar_jump()
171 …API void php_random_xoshiro256starstar_jump_long(php_random_status_state_xoshiro256starstar *state) in php_random_xoshiro256starstar_jump_long() argument
174 jump(state, jmp); in php_random_xoshiro256starstar_jump_long()
181 php_random_status_state_xoshiro256starstar *state = engine.state; in PHP_METHOD() local
185 php_random_xoshiro256starstar_jump(state); in PHP_METHOD()
193 php_random_status_state_xoshiro256starstar *state = engine.state; in PHP_METHOD() local
197 php_random_xoshiro256starstar_jump_long(state); in PHP_METHOD()
205 php_random_status_state_xoshiro256starstar *state = engine.state; in PHP_METHOD() local
225 php_random_xoshiro256starstar_seed256(state, t[0], t[1], t[2], t[3]); in PHP_METHOD()
245 php_random_xoshiro256starstar_seed256(state, t[0], t[1], t[2], t[3]); in PHP_METHOD()
251 php_random_xoshiro256starstar_seed64(state, (uint64_t) int_seed); in PHP_METHOD()