///////////////////////////// CPP ///////////////////////////////////
| 112 | ////////////////////////////////// CPP /////////////////////////////////// |
| 113 | // |
| 114 | TEST(Shift, CPP) { |
| 115 | const unsigned resultIdx = 0; |
| 116 | const unsigned x = 2; |
| 117 | const unsigned y = 0; |
| 118 | const unsigned z = 0; |
| 119 | const unsigned w = 0; |
| 120 | |
| 121 | vector<dim4> numDims; |
| 122 | vector<vector<float>> in; |
| 123 | vector<vector<float>> tests; |
| 124 | readTests<float, float, int>(string(TEST_DIR "/shift/shift4d.test"), |
| 125 | numDims, in, tests); |
| 126 | |
| 127 | dim4 idims = numDims[0]; |
| 128 | array input(idims, &(in[0].front())); |
| 129 | array output = shift(input, x, y, z, w); |
| 130 | |
| 131 | ASSERT_VEC_ARRAY_EQ(tests[resultIdx], idims, output); |
| 132 | } |
| 133 | |
| 134 | TEST(Shift, MaxDim) { |
| 135 | const size_t largeDim = 65535 * 32 + 1; |