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

Function RandomShuffle

tensorflow/core/kernels/random_shuffle_op.cc:40–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38// size - 1 samples are used.
39template <class Iter, class Random>
40static inline void RandomShuffle(Iter first, Iter last, Random& uniform) {
41 if (first == last) return;
42 const auto stop = last - 1;
43 for (auto i = first; i != stop; ++i) {
44 using std::iter_swap;
45 iter_swap(i, i + uniform(last - i));
46 }
47}
48
49template <class IntT, class InT, class OutT, class Random>
50static void IndexedShuffle(const int64 size, const InT& input_mat,

Callers 3

IndexedShuffleFunction · 0.70
ComputeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected