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

Function TEST

test/reorder.cpp:136–156  ·  view source on GitHub ↗

///////////////////////////// CPP ///////////////////////////////////

Source from the content-addressed store, hash-verified

134////////////////////////////////// CPP ///////////////////////////////////
135//
136TEST(Reorder, CPP) {
137 const unsigned resultIdx = 0;
138 const unsigned x = 0;
139 const unsigned y = 1;
140 const unsigned z = 2;
141 const unsigned w = 3;
142
143 vector<dim4> numDims;
144 vector<vector<float>> in;
145 vector<vector<float>> tests;
146 readTests<float, float, int>(string(TEST_DIR "/reorder/reorder4d.test"),
147 numDims, in, tests);
148
149 dim4 idims = numDims[0];
150
151 array input(idims, &(in[0].front()));
152 array output = reorder(input, x, y, z, w);
153
154 dim4 goldDims(idims[x], idims[y], idims[z], idims[w]);
155 ASSERT_VEC_ARRAY_EQ(tests[resultIdx], goldDims, output);
156}
157
158TEST(Reorder, ISSUE_1777) {
159 const int m = 5;

Callers

nothing calls this directly

Calls 5

hostMethod · 0.80
reorderFunction · 0.50
tileFunction · 0.50
rangeFunction · 0.50
dim4Class · 0.50

Tested by

no test coverage detected