D | random_shuffle_op.cc | 40 static inline void RandomShuffle(Iter first, Iter last, Random& uniform) { in RandomShuffle() argument 45 iter_swap(i, i + uniform(last - i)); in RandomShuffle() 51 OutT output_mat, Random& uniform) { in IndexedShuffle() argument 56 RandomShuffle(permutation.begin(), permutation.end(), uniform); in IndexedShuffle() 81 const auto uniform = [&single](uint32 n) { return single() % n; }; in Compute() local 87 RandomShuffle(vec.data(), vec.data() + size, uniform); in Compute() 96 IndexedShuffle<int32>(size, input_mat, output_mat, uniform); in Compute() 98 IndexedShuffle<int64>(size, input_mat, output_mat, uniform); in Compute()
|