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

Method Skip

tensorflow/core/lib/random/philox_random.h:142–158  ·  view source on GitHub ↗

Skip the specified number of samples of 128-bits in the current stream.

Source from the content-addressed store, hash-verified

140
141 // Skip the specified number of samples of 128-bits in the current stream.
142 PHILOX_DEVICE_INLINE
143 void Skip(uint64 count) {
144 const uint32 count_lo = static_cast<uint32>(count);
145 uint32 count_hi = static_cast<uint32>(count >> 32);
146
147 counter_[0] += count_lo;
148 if (counter_[0] < count_lo) {
149 ++count_hi;
150 }
151
152 counter_[1] += count_hi;
153 if (counter_[1] < count_hi) {
154 if (++counter_[2] == 0) {
155 ++counter_[3];
156 }
157 }
158 }
159
160 // Returns a group of four random numbers using the underlying Philox
161 // algorithm.

Callers 3

SkipFromGeneratorMethod · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.36