]> git.sesse.net Git - movit/blobdiff - fp16_test.cpp
Fix fp16_test compilation _without_ f16c-enabled compilation flags.
[movit] / fp16_test.cpp
index 058c91281603fd0b2c0fa2ed8ed4200bc22dab28..7a9d56612b53dbe942d2b6d1b8a079b5cdfa6c3c 100644 (file)
@@ -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);