MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / TEST

Function TEST

test/ireduce.cpp:117–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115MINMAXOP(max, uchar)
116
117TEST(IndexedReduce, MaxIndexedSmall) {
118 const int num = 1000;
119 const int st = 10;
120 const int en = num - 100;
121 array a = randu(num);
122
123 float b;
124 unsigned idx;
125 max<float>(&b, &idx, a(seq(st, en)));
126
127 vector<float> ha(num);
128 a.host(&ha[0]);
129
130 float res = ha[st];
131 for (int i = st; i <= en; i++) { res = std::max(res, ha[i]); }
132
133 ASSERT_EQ(b, res);
134}
135
136TEST(IndexedReduce, MaxIndexedBig) {
137 const int num = 100000;

Callers

nothing calls this directly

Calls 7

randuFunction · 0.85
seqClass · 0.85
constantFunction · 0.85
hostMethod · 0.80
maxFunction · 0.70
minFunction · 0.70
dim4Class · 0.50

Tested by

no test coverage detected