Lines Matching refs:seed
46 static void __init_rand(struct frand_state *state, unsigned int seed) in __init_rand() argument
50 #define LCG(x, seed) ((x) * 69069 ^ (seed)) in __init_rand() argument
52 state->s1 = __seed(LCG((2^31) + (2^17) + (2^7), seed), 1); in __init_rand()
53 state->s2 = __seed(LCG(state->s1, seed), 7); in __init_rand()
54 state->s3 = __seed(LCG(state->s2, seed), 15); in __init_rand()
65 void init_rand_seed(struct frand_state *state, unsigned int seed) in init_rand_seed() argument
67 __init_rand(state, seed); in init_rand_seed()
70 void __fill_random_buf(void *buf, unsigned int len, unsigned long seed) in __fill_random_buf() argument
78 *((int64_t *) ptr) = seed; in __fill_random_buf()
81 *((int32_t *) ptr) = seed; in __fill_random_buf()
84 *((int16_t *) ptr) = seed; in __fill_random_buf()
87 *((int8_t *) ptr) = seed; in __fill_random_buf()
92 seed *= GOLDEN_RATIO_PRIME; in __fill_random_buf()
93 seed >>= 3; in __fill_random_buf()
135 void __fill_random_buf_percentage(unsigned long seed, void *buf, in __fill_random_buf_percentage() argument
161 __fill_random_buf(buf, this_len, seed); in __fill_random_buf_percentage()