| 63 | convert_params(f16, f16, 10))); |
| 64 | |
| 65 | TEST_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 | |
| 83 | TEST(Half, arith) { |
| 84 | SUPPORTED_TYPE_CHECK(af_half); |
nothing calls this directly
no test coverage detected