///////////////////////////// CPP ///////////////////////////////////
| 134 | ////////////////////////////////// CPP /////////////////////////////////// |
| 135 | // |
| 136 | TEST(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 | |
| 158 | TEST(Reorder, ISSUE_1777) { |
| 159 | const int m = 5; |