]> git.sesse.net Git - movit/blobdiff - fp16.cpp
Use the F16C instruction set when available.
[movit] / fp16.cpp
index 3738f5c4360bd055cdd5a39ed32d9aecdb8a3158..fc5800e4a964855c0cfb00efa29c0c7d96d94a31 100644 (file)
--- a/fp16.cpp
+++ b/fp16.cpp
@@ -209,6 +209,8 @@ const int FP16_MAX_EXPONENT = (1 << FP16_EXPONENT_BITS) - 1;
 
 }  // namespace
 
+#ifndef __F16C__
+
 double fp16_to_fp64(fp16_int_t x)
 {
        return fp_upconvert<fp16_int_t,
@@ -223,6 +225,8 @@ fp16_int_t fp64_to_fp16(double x)
               FP64_BIAS, FP64_MANTISSA_BITS, FP64_EXPONENT_BITS, FP64_MAX_EXPONENT>(x);
 }
 
+#endif
+
 double fp32_to_fp64(fp32_int_t x)
 {
        return fp_upconvert<fp32_int_t,