| 29 | } |
| 30 | |
| 31 | uint32 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 |
no outgoing calls