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

Function TEST

test/shift.cpp:114–132  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

112////////////////////////////////// CPP ///////////////////////////////////
113//
114TEST(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
134TEST(Shift, MaxDim) {
135 const size_t largeDim = 65535 * 32 + 1;

Callers

nothing calls this directly

Calls 5

absFunction · 0.70
shiftFunction · 0.50
rangeFunction · 0.50
dim4Class · 0.50
iotaFunction · 0.50

Tested by

no test coverage detected