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

Function cast_test_complex_real

test/cast.cpp:84–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82// conversion explicit.
83template<typename Ti, typename To>
84void cast_test_complex_real() {
85 SUPPORTED_TYPE_CHECK(Ti);
86 SUPPORTED_TYPE_CHECK(To);
87
88 af_dtype ta = (af_dtype)dtype_traits<Ti>::af_type;
89 af_dtype tb = (af_dtype)dtype_traits<To>::af_type;
90 dim4 dims(num, 1, 1, 1);
91 af_array a, b;
92 af_randu(&a, dims.ndims(), dims.get(), ta);
93 af_err err = af_cast(&b, a, tb);
94 ASSERT_EQ(err, AF_ERR_TYPE);
95 ASSERT_SUCCESS(af_release_array(a));
96}
97
98#define COMPLEX_REAL_TESTS(Ti, To) \
99 TEST(CAST_TEST, Test_Complex_To_Real_##Ti##_##To) { \

Callers

nothing calls this directly

Calls 5

af_randuFunction · 0.50
af_castFunction · 0.50
af_release_arrayFunction · 0.50
ndimsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected