Lines Matching refs:lg_range
67 prng_lg_range_u32(atomic_u32_t *state, unsigned lg_range, bool atomic) { in prng_lg_range_u32() argument
70 assert(lg_range > 0); in prng_lg_range_u32()
71 assert(lg_range <= 32); in prng_lg_range_u32()
84 ret = state1 >> (32 - lg_range); in prng_lg_range_u32()
90 prng_lg_range_u64(uint64_t *state, unsigned lg_range) { in prng_lg_range_u64() argument
93 assert(lg_range > 0); in prng_lg_range_u64()
94 assert(lg_range <= 64); in prng_lg_range_u64()
98 ret = state1 >> (64 - lg_range); in prng_lg_range_u64()
104 prng_lg_range_zu(atomic_zu_t *state, unsigned lg_range, bool atomic) { in prng_lg_range_zu() argument
107 assert(lg_range > 0); in prng_lg_range_zu()
108 assert(lg_range <= ZU(1) << (3 + LG_SIZEOF_PTR)); in prng_lg_range_zu()
121 ret = state1 >> ((ZU(1) << (3 + LG_SIZEOF_PTR)) - lg_range); in prng_lg_range_zu()
134 unsigned lg_range; in prng_range_u32() local
139 lg_range = ffs_u32(pow2_ceil_u32(range)) - 1; in prng_range_u32()
143 ret = prng_lg_range_u32(state, lg_range, atomic); in prng_range_u32()
152 unsigned lg_range; in prng_range_u64() local
157 lg_range = ffs_u64(pow2_ceil_u64(range)) - 1; in prng_range_u64()
161 ret = prng_lg_range_u64(state, lg_range); in prng_range_u64()
170 unsigned lg_range; in prng_range_zu() local
175 lg_range = ffs_u64(pow2_ceil_u64(range)) - 1; in prng_range_zu()
179 ret = prng_lg_range_zu(state, lg_range, atomic); in prng_range_zu()