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

Function transposeip_test

test/transpose_inplace.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40template<typename T>
41void transposeip_test(dim4 dims) {
42 SUPPORTED_TYPE_CHECK(T);
43
44 af_array inArray = 0;
45 af_array outArray = 0;
46
47 ASSERT_SUCCESS(af_randu(&inArray, dims.ndims(), dims.get(),
48 (af_dtype)dtype_traits<T>::af_type));
49
50 ASSERT_SUCCESS(af_transpose(&outArray, inArray, false));
51 ASSERT_SUCCESS(af_transpose_inplace(inArray, false));
52
53 ASSERT_ARRAYS_EQ(inArray, outArray);
54
55 // cleanup
56 ASSERT_SUCCESS(af_release_array(inArray));
57 ASSERT_SUCCESS(af_release_array(outArray));
58}
59
60#define INIT_TEST(Side, D3, D4) \
61 TYPED_TEST(Transpose, TranposeIP_##Side) { \

Callers

nothing calls this directly

Calls 6

af_randuFunction · 0.50
af_transposeFunction · 0.50
af_transpose_inplaceFunction · 0.50
af_release_arrayFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected