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

Function resizeArgsTest

test/resize.cpp:318–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317template<typename T>
318void resizeArgsTest(af_err err, string pTestFile, const dim4 odims,
319 const af_interp_type method) {
320 SUPPORTED_TYPE_CHECK(T);
321
322 vector<dim4> numDims;
323 vector<vector<T>> in;
324 vector<vector<T>> tests;
325 readTests<T, T, float>(pTestFile, numDims, in, tests);
326
327 dim4 dims = numDims[0];
328
329 af_array inArray = 0;
330 af_array outArray = 0;
331 ASSERT_SUCCESS(af_create_array(&inArray, &(in[0].front()), dims.ndims(),
332 dims.get(),
333 (af_dtype)dtype_traits<T>::af_type));
334
335 ASSERT_EQ(err, af_resize(&outArray, inArray, odims[0], odims[1], method));
336
337 if (inArray != 0) af_release_array(inArray);
338 if (outArray != 0) af_release_array(outArray);
339}
340
341TYPED_TEST(Resize, InvalidArgsDims0) {
342 dim4 dims(0, 5, 2, 1);

Callers

nothing calls this directly

Calls 5

af_create_arrayFunction · 0.50
af_resizeFunction · 0.50
af_release_arrayFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected