Returns random number with specified number of bits, i.e., in the range [2^(bits-1),2^bits).
| 370 | // Returns random number with specified number of bits, |
| 371 | // i.e., in the range [2^(bits-1),2^bits). |
| 372 | uint64 NextBits(random::SimplePhilox* rnd, int bits) { |
| 373 | return (bits != 0) |
| 374 | ? (rnd->Rand64() % (1LL << (bits - 1))) + (1LL << (bits - 1)) |
| 375 | : 0; |
| 376 | } |
| 377 | |
| 378 | template <typename T> |
| 379 | void BM_WriteNum(int n, T multiplier) { |
no test coverage detected