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

Function scanByKeyTest

test/scan_by_key.cpp:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110
111template<typename Ti, typename To, af_binary_op op, bool inclusive_scan>
112void scanByKeyTest(dim4 dims, int scanDim, vector<int> nodeLengths,
113 int keyStart, int keyEnd, Ti dataStart, Ti dataEnd,
114 double eps) {
115 vector<int> key =
116 createScanKey<int>(dims, scanDim, nodeLengths, keyStart, keyEnd);
117 vector<Ti> in = createScanData<Ti>(dims, dataStart, dataEnd);
118
119 array afkey(dims, key.data());
120 array afin(dims, in.data());
121 array afout = scanByKey(afkey, afin, scanDim, op, inclusive_scan);
122 vector<To> out(afout.elements());
123 afout.host(out.data());
124
125 verify<Ti, int, To, op, inclusive_scan>(dims, in, key, out, scanDim, eps);
126}
127
128#define SCAN_BY_KEY_TEST(FN, X, Y, Z, W, Ti, To, INC, DIM, DSTART, DEND, EPS) \
129 TEST(ScanByKey, Test_Scan_By_Key_##FN##_##Ti##_##INC##_##DIM) { \

Callers

nothing calls this directly

Calls 3

scanByKeyFunction · 0.85
hostMethod · 0.80
elementsMethod · 0.45

Tested by

no test coverage detected