]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix DEAL_II_COMPILER_USE_VECTOR_ARITHMETICS with AVX512 and Intel. 3653/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 1 Dec 2016 17:49:02 +0000 (18:49 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 1 Dec 2016 17:49:02 +0000 (18:49 +0100)
cmake/checks/check_01_compiler_features.cmake

index 62f6e0d8669c48c7be9c69fc8ca750ef73123d01..15d2e25ce5e75cc89fde46ee9ca0b55bae7a3e5d 100644 (file)
@@ -51,6 +51,9 @@
 CHECK_CXX_SOURCE_COMPILES(
   "
   #include <emmintrin.h>
+#ifdef __AVX512F__
+  #include <immintrin.h>
+#endif
   int main()
   {
     __m128d a, b;
@@ -60,6 +63,16 @@ CHECK_CXX_SOURCE_COMPILES(
     __m128d d = b - c;
     __m128d e = c * a + d;
     __m128d f = e/a;
+#ifdef __AVX512F__
+    __m512d g, h;
+    g = _mm512_set1_pd (1.0);
+    h = _mm512_set1_pd (2.1);
+    __m512d i = g + h;
+    g = i - g;
+    h *= i;
+    i = h/i;
+    (void)i;
+#endif
     (void)f;
   }
   "

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.