]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixes compilation issue when using altivec vectorization. 7320/head
authorSambit Das <dsambit@ln001.conflux.arc-ts.umich.edu>
Wed, 10 Oct 2018 01:51:09 +0000 (21:51 -0400)
committerSambit Das <dsambit@umich.edu>
Wed, 10 Oct 2018 06:12:45 +0000 (01:12 -0500)
include/deal.II/base/vectorization.h

index 0da1de39bb3a12c099b94ad99eb065014eb66080..8fc387a5b34829b42554326546d9bee9993a5959 100644 (file)
     "Mismatch in vectorization capabilities: AVX-512F was detected during configuration of deal.II and switched on, but it is apparently not available for the file you are trying to compile at the moment. Check compilation flags controlling the instruction set, such as -march=native."
 #endif
 
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 // AVX, AVX-512
+#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && \
+  (defined(__AVX__) || defined(__AVX512F__)) // AVX, AVX-512
 #  include <immintrin.h>
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL == 1 // SSE2
+#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL == 1 && defined(__SSE2__) // SSE2
 #  include <emmintrin.h>
 #endif
 
@@ -2892,7 +2893,8 @@ vectorized_transpose_and_store(const bool                    add_into,
 #endif // if DEAL_II_COMPILER_VECTORIZATION_LEVEL > 0 && defined(__SSE2__)
 
 
-#if DEAL_II_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__) && defined(__VSX__)
+#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__) && \
+  defined(__VSX__)
 
 template <>
 class VectorizedArray<double>

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.