MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / NextBits

Function NextBits

tensorflow/core/lib/strings/ordered_code_test.cc:372–376  ·  view source on GitHub ↗

Returns random number with specified number of bits, i.e., in the range [2^(bits-1),2^bits).

Source from the content-addressed store, hash-verified

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

Callers 2

BM_WriteNumFunction · 0.85
BM_ReadNumFunction · 0.85

Calls 1

Rand64Method · 0.80

Tested by

no test coverage detected