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

Function TEST

tensorflow/core/util/sorter_test.cc:57–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57TEST(SorterQSort, UInt64Less) {
58 thread::ThreadPool threads(Env::Default(), "test", 16);
59 Less<uint64> less;
60 for (int num : {0, 1, 100, 1000, 10000, 100000}) {
61 for (int nth : {-1, 0, 4, 16}) {
62 std::vector<uint64> a, b;
63 GenRandomUInt64(num, &a);
64 b = a;
65 ParallelSorter sorter(nth, &threads);
66 sorter.QSort(a, less);
67 std::sort(b.begin(), b.end(), less);
68 EXPECT_EQ(a, b);
69 }
70 }
71}
72
73TEST(SorterQSort, FloatGreater) {
74 thread::ThreadPool threads(Env::Default(), "test", 16);

Callers

nothing calls this directly

Calls 7

DefaultFunction · 0.85
GenRandomUInt64Function · 0.85
sortFunction · 0.85
GenRandomFloatFunction · 0.85
QSortMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected