MCPcopy Create free account
hub / github.com/numpy/numpy / bounded_masked_uint64

Function bounded_masked_uint64

numpy/random/src/distributions/distributions.c:1116–1124  ·  view source on GitHub ↗

Static `masked rejection` function called by random_bounded_uint64(...) */

Source from the content-addressed store, hash-verified

1114
1115/* Static `masked rejection` function called by random_bounded_uint64(...) */
1116static inline uint64_t bounded_masked_uint64(bitgen_t *bitgen_state,
1117 uint64_t rng, uint64_t mask) {
1118 uint64_t val;
1119
1120 while ((val = (next_uint64(bitgen_state) & mask)) > rng)
1121 ;
1122
1123 return val;
1124}
1125
1126/* Static `masked rejection` function called by
1127 * random_buffered_bounded_uint32(...) */

Callers 2

random_bounded_uint64Function · 0.85

Calls 1

next_uint64Function · 0.85

Tested by

no test coverage detected