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

Method Skewed

tensorflow/core/lib/random/simple_philox.cc:31–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31uint32 SimplePhilox::Skewed(int max_log) {
32 CHECK(0 <= max_log && max_log <= 32);
33 const int shift = Rand32() % (max_log + 1);
34 const uint32 mask = shift == 32 ? ~static_cast<uint32>(0) : (1 << shift) - 1;
35 return Rand32() & mask;
36}
37
38} // namespace random
39} // namespace tensorflow

Callers 2

TEST_FFunction · 0.80
RandomSkewedStringFunction · 0.80

Calls

no outgoing calls

Tested by 2

TEST_FFunction · 0.64
RandomSkewedStringFunction · 0.64