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

Function TEST_P

test/half.cpp:65–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 convert_params(f16, f16, 10)));
64
65TEST_P(HalfConvert, convert) {
66 SUPPORTED_TYPE_CHECK(af_half);
67 convert_params params = GetParam();
68 if (noDoubleTests(params.to))
69 GTEST_SKIP() << "Double not supported on this device";
70 if (noDoubleTests(params.from))
71 GTEST_SKIP() << "Double not supported on this device";
72
73 array from = af::constant(params.value, 3, 3, params.from);
74 array to = from.as(params.to);
75
76 ASSERT_EQ(from.type(), params.from);
77 ASSERT_EQ(to.type(), params.to);
78
79 array gold = af::constant(params.value, 3, 3, params.to);
80 ASSERT_ARRAYS_EQ(gold, to);
81}
82
83TEST(Half, arith) {
84 SUPPORTED_TYPE_CHECK(af_half);

Callers

nothing calls this directly

Calls 4

noDoubleTestsFunction · 0.85
constantFunction · 0.85
asMethod · 0.80
typeMethod · 0.80

Tested by

no test coverage detected