summarylogtreecommitdiffstats
path: root/f16c_fix.patch
diff options
context:
space:
mode:
authorDarjan Krijan2020-12-23 00:56:19 +0100
committerGitHub2020-12-22 18:56:19 -0500
commit3d6b0b67651d92c32e3294ac8fcaa72666e4695d (patch)
treefc077e4d57bedd054b15d3f1a3291f31cd2b3a21 /f16c_fix.patch
parent22e65d2c9e3bef15f7c15f3e3ec9bafb1be38395 (diff)
downloadaur-half.tar.gz
[half] Fix a bug in the half.hpp include file not enabling F16C intrinsics correctly when the architecture supports it. (#93)
Diffstat (limited to 'f16c_fix.patch')
-rw-r--r--f16c_fix.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/f16c_fix.patch b/f16c_fix.patch
new file mode 100644
index 00000000000..6cd0b5c5315
--- /dev/null
+++ b/f16c_fix.patch
@@ -0,0 +1,23 @@
+--- upstream/half.hpp 2020-12-22 10:47:45.583725510 +0100
++++ f16c_fix/half.hpp 2020-12-22 10:48:21.917419594 +0100
+@@ -266,10 +266,6 @@
+ #if HALF_ENABLE_CPP11_HASH
+ #include <functional>
+ #endif
+-#if HALF_ENABLE_F16C_INTRINSICS
+- #include <immintrin.h>
+-#endif
+-
+
+ #ifndef HALF_ENABLE_F16C_INTRINSICS
+ /// Enable F16C intruction set intrinsics.
+@@ -280,6 +276,9 @@
+ /// Unless predefined it will be enabled automatically when the `__F16C__` symbol is defined, which some compilers do on supporting platforms.
+ #define HALF_ENABLE_F16C_INTRINSICS __F16C__
+ #endif
++#if HALF_ENABLE_F16C_INTRINSICS
++ #include <immintrin.h>
++#endif
+
+ #ifdef HALF_DOXYGEN_ONLY
+ /// Type for internal floating-point computations.