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

Function medfiltWindowTest

test/medfilt.cpp:245–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244template<typename T>
245void medfiltWindowTest(void) {
246 SUPPORTED_TYPE_CHECK(T);
247
248 af_array inArray = 0;
249 af_array outArray = 0;
250
251 vector<T> in(100, 1);
252
253 // Check for 4D inputs
254 dim4 dims(10, 10, 1, 1);
255
256 ASSERT_SUCCESS(af_create_array(&inArray, &in.front(), dims.ndims(),
257 dims.get(),
258 (af_dtype)dtype_traits<T>::af_type));
259
260 ASSERT_EQ(AF_ERR_ARG, af_medfilt2(&outArray, inArray, 3, 5, AF_PAD_ZERO));
261
262 ASSERT_SUCCESS(af_release_array(inArray));
263}
264
265TYPED_TEST(MedianFilter, InvalidWindow) { medfiltWindowTest<TypeParam>(); }
266

Callers

nothing calls this directly

Calls 5

af_create_arrayFunction · 0.50
af_medfilt2Function · 0.50
af_release_arrayFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected