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

Function TEST

test/tile.cpp:123–142  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

121///////////////////////////////// CPP ////////////////////////////////////
122//
123TEST(Tile, CPP) {
124 const unsigned resultIdx = 0;
125 const unsigned x = 2;
126 const unsigned y = 2;
127 const unsigned z = 2;
128 const unsigned w = 1;
129
130 vector<dim4> numDims;
131 vector<vector<float>> in;
132 vector<vector<float>> tests;
133 readTests<float, float, int>(string(TEST_DIR "/tile/tile_large3D.test"),
134 numDims, in, tests);
135
136 dim4 idims = numDims[0];
137 array input(idims, &(in[0].front()));
138 array output = tile(input, x, y, z, w);
139
140 dim4 goldDims(idims[0] * x, idims[1] * y, idims[2] * z, idims[3] * w);
141 ASSERT_VEC_ARRAY_EQ(tests[resultIdx], goldDims, output);
142}
143
144TEST(Tile, MaxDim) {
145 const size_t largeDim = 65535 * 32 + 1;

Callers

nothing calls this directly

Calls 8

constantFunction · 0.85
seqClass · 0.85
moddimsFunction · 0.85
tileFunction · 0.50
iotaFunction · 0.50
dim4Class · 0.50
dimsMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected