From: Sambit Das Date: Wed, 10 Oct 2018 01:51:09 +0000 (-0400) Subject: Fixes compilation issue when using altivec vectorization. X-Git-Tag: v9.1.0-rc1~635^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44d19207ba73e904cc4b94dc5478ae1cc3fc117e;p=dealii.git Fixes compilation issue when using altivec vectorization. --- 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