X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=fp16_test.cpp;h=7a9d56612b53dbe942d2b6d1b8a079b5cdfa6c3c;hp=058c91281603fd0b2c0fa2ed8ed4200bc22dab28;hb=7f1fabb816ee5010be83abf5da58e92429609547;hpb=425d68dcbdd681ad3157000360521e8f36eb6c4c diff --git a/fp16_test.cpp b/fp16_test.cpp index 058c912..7a9d566 100644 --- a/fp16_test.cpp +++ b/fp16_test.cpp @@ -46,6 +46,13 @@ union fp64 { unsigned long long ll; }; +#ifdef __F16C__ +union fp32 { + float f; + unsigned int u; +}; +#endif + TEST(FP16Test, NaN) { // Ignore the sign bit. EXPECT_EQ(0x7e00, fp32_to_fp16(0.0 / 0.0).val & 0x7fff);