From 44d19207ba73e904cc4b94dc5478ae1cc3fc117e Mon Sep 17 00:00:00 2001 From: Sambit Das Date: Tue, 9 Oct 2018 21:51:09 -0400 Subject: [PATCH] Fixes compilation issue when using altivec vectorization. --- include/deal.II/base/vectorization.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 0da1de39bb..8fc387a5b3 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -51,9 +51,10 @@ "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 -#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL == 1 // SSE2 +#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL == 1 && defined(__SSE2__) // SSE2 # include #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 -- 2.39.5