# DEAL_II_HAVE_AVX512 *)
# DEAL_II_HAVE_ALTIVEC *)
# DEAL_II_HAVE_OPENMP_SIMD *)
-# DEAL_II_COMPILER_VECTORIZATION_LEVEL
+# DEAL_II_VECTORIZATION_WIDTH_IN_BITS
# DEAL_II_OPENMP_SIMD_PRAGMA
#
# *)
#
IF(DEAL_II_HAVE_AVX512)
- SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 3)
+ SET(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 512)
ELSEIF(DEAL_II_HAVE_AVX)
- SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 2)
+ SET(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 256)
ELSEIF(DEAL_II_HAVE_SSE2)
- SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 1)
+ SET(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128)
ELSE()
- SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 0)
+ SET(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 0)
ENDIF()
IF(DEAL_II_HAVE_ALTIVEC)
- SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 1)
+ SET(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128)
ENDIF()
#
#
IF(DEAL_II_WITH_CUDA)
- SET(DEAL_II_COMPILER_VECTORIZATION_LEVEL 0)
+ SET(DEAL_II_VECTORIZATION_WIDTH_IN_BITS 0)
ENDIF()
#
SET(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED "VectorizedArray<double,1>" "VectorizedArray<float,1>")
SET(DEAL_II_EXPAND_FLOAT_VECTORIZED "VectorizedArray<float,1>")
-IF(${DEAL_II_COMPILER_VECTORIZATION_LEVEL} GREATER 0)
+IF(${DEAL_II_VECTORIZATION_WIDTH_IN_BITS} GREATER 0)
SET(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED
"${DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED}" "VectorizedArray<double,2>" "VectorizedArray<float,4>")
SET(DEAL_II_EXPAND_FLOAT_VECTORIZED "${DEAL_II_EXPAND_FLOAT_VECTORIZED}" "VectorizedArray<float,4>")
ENDIF()
-IF((${DEAL_II_COMPILER_VECTORIZATION_LEVEL} GREATER 1) AND ( DEAL_II_HAVE_AVX OR DEAL_II_HAVE_ALTIVEC))
+IF((${DEAL_II_VECTORIZATION_WIDTH_IN_BITS} GREATER 128))
SET(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED
"${DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED}" "VectorizedArray<double,4>" "VectorizedArray<float,8>")
SET(DEAL_II_EXPAND_FLOAT_VECTORIZED "${DEAL_II_EXPAND_FLOAT_VECTORIZED}" "VectorizedArray<float,8>")
ENDIF()
-IF((${DEAL_II_COMPILER_VECTORIZATION_LEVEL} GREATER 2) AND DEAL_II_HAVE_AVX512)
+IF((${DEAL_II_VECTORIZATION_WIDTH_IN_BITS} GREATER 256))
SET(DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED
"${DEAL_II_EXPAND_REAL_SCALARS_VECTORIZED}" "VectorizedArray<double,8>" "VectorizedArray<float,16>")
SET(DEAL_II_EXPAND_FLOAT_VECTORIZED "${DEAL_II_EXPAND_FLOAT_VECTORIZED}" "VectorizedArray<float,16>")
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
_detailed("# DEAL_II_LIBRARIES_DEBUG: ${BASE_LIBRARIES_DEBUG}\n")
ENDIF()
-_detailed("# DEAL_II_COMPILER_VECTORIZATION_LEVEL: ${DEAL_II_COMPILER_VECTORIZATION_LEVEL}\n")
+_detailed("# DEAL_II_VECTORIZATION_WIDTH_IN_BITS: ${DEAL_II_VECTORIZATION_WIDTH_IN_BITS}\n")
_detailed("#\n")
pcout << "Vectorization over " << n_vect_doubles
<< " doubles = " << n_vect_bits << " bits ("
- << Utilities::System::get_current_vectorization_level()
- << "), VECTORIZATION_LEVEL=" << DEAL_II_COMPILER_VECTORIZATION_LEVEL
+ << Utilities::System::get_current_vectorization_level() << ")"
<< std::endl;
}
const unsigned int n_vect_bits = 8 * sizeof(double) * n_vect_doubles;
pcout << "Vectorization over " << n_vect_doubles
<< " doubles = " << n_vect_bits << " bits ("
- << Utilities::System::get_current_vectorization_level()
- << "), VECTORIZATION_LEVEL=" << DEAL_II_COMPILER_VECTORIZATION_LEVEL
+ << Utilities::System::get_current_vectorization_level() << ")"
<< std::endl
<< std::endl;
}
*/
#cmakedefine DEAL_II_WORDS_BIGENDIAN
-#define DEAL_II_COMPILER_VECTORIZATION_LEVEL @DEAL_II_COMPILER_VECTORIZATION_LEVEL@
+
+/*
+ * This sets the largest number of vectorization bits detected for the given
+ * compiler flags and hardware (e.g. 256 for AVX on x86-64 architectures) for
+ * use in deal.II's instrinsics-based VectorizedArray class.
+ */
+#define DEAL_II_VECTORIZATION_WIDTH_IN_BITS @DEAL_II_VECTORIZATION_WIDTH_IN_BITS@
+
+/*
+ * Backward compatibility setting
+ */
+#ifdef DEAL_II_COMPILER_HAS_DIAGNOSTIC_PRAGMA
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 512
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL _Pragma ("GCC warning \"The DEAL_II_COMPILER_VECTORIZATION_LEVEL macro is deprecated\"") 3
+# elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 256
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL _Pragma ("GCC warning \"The DEAL_II_COMPILER_VECTORIZATION_LEVEL macro is deprecated\"") 2
+# elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 128
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL _Pragma ("GCC warning \"The DEAL_II_COMPILER_VECTORIZATION_LEVEL macro is deprecated\"") 1
+# else
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL _Pragma ("GCC warning \"The DEAL_II_COMPILER_VECTORIZATION_LEVEL macro is deprecated\"")\
+ 0
+# endif
+#else
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 512
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL 3
+# elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 256
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL 2
+# elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS == 128
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
+# else
+# define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
+# endif
+#endif
+
#define DEAL_II_OPENMP_SIMD_PRAGMA @DEAL_II_OPENMP_SIMD_PRAGMA@
* Maximal vector length of VectorizedArray for double.
*/
constexpr static unsigned int max_width =
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__)
- 2;
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
8;
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
4;
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
2;
#else
1;
* Maximal vector length of VectorizedArray for float.
*/
constexpr static unsigned int max_width =
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__ALTIVEC__)
4;
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512 && defined(__AVX512F__)
16;
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__AVX__)
8;
-#elif DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#elif DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__SSE2__)
4;
#else
1;
get_cpu_load();
/**
- * Return the current level of vectorization as described by
- * DEAL_II_COMPILER_VECTORIZATION_LEVEL in vectorization.h as a string. The
+ * Return the instruction set extension for vectorization as described by
+ * DEAL_II_VECTORIZATION_WIDTH_IN_BITS in vectorization.h as a string. The
* list of possible return values is:
*
* <table>
* </tr>
* <tr>
* <td>1</td>
- * <td>SSE2</td>
+ * <td>SSE2/AltiVec</td>
* <td>128</td>
* </tr>
* <tr>
#include <cmath>
// Note:
-// The flag DEAL_II_COMPILER_VECTORIZATION_LEVEL is essentially constructed
+// The flag DEAL_II_VECTORIZATION_WIDTH_IN_BITS is essentially constructed
// according to the following scheme (on x86-based architectures)
// #ifdef __AVX512F__
-// #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 3
+// #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 512
// #elif defined (__AVX__)
-// #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 2
+// #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 256
// #elif defined (__SSE2__)
-// #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 1
+// #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 128
// #else
-// #define DEAL_II_COMPILER_VECTORIZATION_LEVEL 0
+// #define DEAL_II_VECTORIZATION_WIDTH_IN_BITS 0
// #endif
-// In addition to checking the flags __AVX__ and __SSE2__, a CMake test,
-// 'check_01_cpu_features.cmake', ensures that these feature are not only
+// In addition to checking the flags __AVX512F__, __AVX__ and __SSE2__, a CMake
+// test, 'check_01_cpu_features.cmake', ensures that these feature are not only
// present in the compilation unit but also working properly.
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL > 0
-
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__SSE2__) && \
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS > 0
+
+// These error messages try to detect the case that deal.II was compiled with
+// a wider instruction set extension as the current compilation unit, for
+// example because deal.II was compiled with AVX, but a user project does not
+// add -march=native or similar flags, making it fall to SSE2. This leads to
+// very strange errors as the size of data structures differs between the
+// compiled deal.II code sitting in libdeal_II.so and the user code if not
+// detected. The __SSE2__ flag ensures that we are actually on a x86-64
+// architecture as we do not want to emit the error on another architecture
+// with 256 bit vectors.
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__SSE2__) && \
!defined(__AVX__)
# error \
"Mismatch in vectorization capabilities: AVX 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 >= 3 && defined(__SSE2__) && \
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512 && defined(__SSE2__) && \
!defined(__AVX512F__)
# error \
"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."
// for safety, also check that __AVX512F__ is defined in case the user manually
// set some conflicting compile flags which prevent compilation
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512 && defined(__AVX512F__)
/**
* Specialization of VectorizedArray class for double and AVX-512.
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__AVX__)
/**
* Specialization of VectorizedArray class for double and AVX.
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__SSE2__)
/**
* Specialization for double and SSE2.
-# endif // if DEAL_II_COMPILER_VECTORIZATION_LEVEL > 0 && defined(__SSE2__)
+# endif // if DEAL_II_VECTORIZATION_WIDTH_IN_BITS > 0 && defined(__SSE2__)
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__) && \
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__ALTIVEC__) && \
defined(__VSX__)
template <>
*/
enum class SIMDComparison : int
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__AVX__)
equal = _CMP_EQ_OQ,
not_equal = _CMP_NEQ_OQ,
less_than = _CMP_LT_OQ,
//@}
#ifndef DOXYGEN
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512 && defined(__AVX512F__)
template <SIMDComparison predicate>
DEAL_II_ALWAYS_INLINE inline VectorizedArray<float, 16>
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__AVX__)
template <SIMDComparison predicate>
DEAL_II_ALWAYS_INLINE inline VectorizedArray<float, 8>
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__SSE2__)
template <SIMDComparison predicate>
DEAL_II_ALWAYS_INLINE inline VectorizedArray<float, 4>
const unsigned int * indices,
Number * dst_ptr)
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL < 3
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS < 512
for (unsigned int v = 0; v < width; ++v)
dst_ptr[indices[v]] += src[v];
#else
VectorizedArrayType &res,
std::integral_constant<bool, true>) const
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL < 3
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS < 512
for (unsigned int v = 0; v < VectorizedArrayType::size(); ++v)
vector_access(vec, indices[v] + constant_offset) += res[v];
#else
const std::string
get_current_vectorization_level()
{
- switch (DEAL_II_COMPILER_VECTORIZATION_LEVEL)
+ switch (DEAL_II_VECTORIZATION_WIDTH_IN_BITS)
{
case 0:
return "disabled";
- case 1:
+ case 128:
#ifdef __ALTIVEC__
return "AltiVec";
#else
return "SSE2";
#endif
- case 2:
+ case 256:
return "AVX";
- case 3:
+ case 512:
return "AVX512";
default:
AssertThrow(false,
ExcInternalError(
- "Invalid DEAL_II_COMPILER_VECTORIZATION_LEVEL."));
+ "Invalid DEAL_II_VECTORIZATION_WIDTH_IN_BITS."));
return "ERROR";
}
}
std::is_trivial<VectorizedArray<float>>::value,
"VectorizedArray<float> must be a POD type");
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && !defined(DEAL_II_MSVC)
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+// For the specializations of VectorizedArray, we need to instantiate the
+// static constexpr variable for some compilers. On the other hand, MSCV wants
+// us explicitly to not do so, otherwise we get: "error C2908: explicit
+// specialization 'const unsigned int
+// dealii::VectorizedArray<double, 2>::n_array_elements' has already been
+// instantiated".
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && !defined(DEAL_II_MSVC)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
const unsigned int VectorizedArray<double, 8>::n_array_elements;
-# endif
-
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
-const unsigned int VectorizedArray<double, 4>::n_array_elements;
-# endif
-
-# if (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)) || \
- (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__))
-const unsigned int VectorizedArray<double, 2>::n_array_elements;
-# endif
-
-
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
const unsigned int VectorizedArray<float, 16>::n_array_elements;
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
+const unsigned int VectorizedArray<double, 4>::n_array_elements;
const unsigned int VectorizedArray<float, 8>::n_array_elements;
# endif
-# if (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)) || \
- (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__))
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
+const unsigned int VectorizedArray<double, 2>::n_array_elements;
const unsigned int VectorizedArray<float, 4>::n_array_elements;
# endif
#endif
template struct internal::MatrixFreeFunctions::
FPArrayComparator<float, VectorizedArray<float, 1>>;
-# if (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)) || \
- (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__))
+# if (DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__SSE2__)) || \
+ (DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 && defined(__ALTIVEC__))
template struct internal::MatrixFreeFunctions::
FPArrayComparator<double, VectorizedArray<double, 2>>;
template struct internal::MatrixFreeFunctions::
FPArrayComparator<float, VectorizedArray<float, 4>>;
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 && defined(__AVX__)
template struct internal::MatrixFreeFunctions::
FPArrayComparator<double, VectorizedArray<double, 4>>;
template struct internal::MatrixFreeFunctions::
FPArrayComparator<float, VectorizedArray<float, 8>>;
# endif
-# if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512 && defined(__AVX512F__)
template struct internal::MatrixFreeFunctions::
FPArrayComparator<double, VectorizedArray<double, 8>>;
template struct internal::MatrixFreeFunctions::
{
initlog();
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test(VectorizedArray<double, 8>(2.0));
do_test(VectorizedArray<float, 16>(2.0));
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test(VectorizedArray<double, 4>(2.0));
do_test(VectorizedArray<float, 8>(2.0));
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test(VectorizedArray<double, 2>(2.0));
do_test(VectorizedArray<float, 4>(2.0));
#endif
static void
test()
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test<double, n_numbers, 8>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test<double, n_numbers, 4>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test<double, n_numbers, 2>();
#endif
static void
test()
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test<float, n_numbers, 16>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test<float, n_numbers, 8>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test<float, n_numbers, 4>();
#endif
do_test(make_vectorized_array<double>(2.0), 2.0);
do_test(VectorizedArray<double>(2.0), 2.0);
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test(make_vectorized_array<VectorizedArray<double, 8>>(2.0), 2.0);
do_test(VectorizedArray<double, 8>(2.0), 2.0);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test(make_vectorized_array<VectorizedArray<double, 4>>(2.0), 2.0);
do_test(VectorizedArray<double, 4>(2.0), 2.0);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test(make_vectorized_array<VectorizedArray<double, 2>>(2.0), 2.0);
do_test(VectorizedArray<double, 2>(2.0), 2.0);
#endif
do_test(make_vectorized_array<float>(2.0), 2.0);
do_test(VectorizedArray<float>(2.0), 2.0);
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test(make_vectorized_array<VectorizedArray<float, 16>>(2.0), 2.0);
do_test(VectorizedArray<float, 16>(2.0), 2.0);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test(make_vectorized_array<VectorizedArray<float, 8>>(2.0), 2.0);
do_test(VectorizedArray<float, 8>(2.0), 2.0);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test(make_vectorized_array<VectorizedArray<float, 4>>(2.0), 2.0);
do_test(VectorizedArray<float, 4>(2.0), 2.0);
#endif
{
initlog();
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test(VectorizedArray<double, 8>(2.0), 3.0);
do_test(VectorizedArray<float, 16>(2.0), 3.0);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test(VectorizedArray<double, 4>(2.0), 3.0);
do_test(VectorizedArray<float, 8>(2.0), 3.0);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test(VectorizedArray<double, 2>(2.0), 3.0);
do_test(VectorizedArray<float, 4>(2.0), 3.0);
#endif
{
initlog();
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test<VectorizedArray<double, 8>>();
do_test<VectorizedArray<float, 16>>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test<VectorizedArray<double, 4>>();
do_test<VectorizedArray<float, 8>>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test<VectorizedArray<double, 2>>();
do_test<VectorizedArray<float, 4>>();
#endif
static void
test()
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test<double, n_numbers, 8>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test<double, n_numbers, 4>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test<double, n_numbers, 2>();
#endif
static void
test()
{
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test<float, n_numbers, 16>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test<float, n_numbers, 8>();
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test<float, n_numbers, 4>();
#endif
do_test<dim, fe_degree, fe_degree + 1, double, VectorizedArray<double, 1>>(
dof, constraints, true);
-#if (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__SSE2__)) || \
- (DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 1 && defined(__ALTIVEC__))
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128
do_test<dim, fe_degree, fe_degree + 1, double, VectorizedArray<double, 2>>(
dof, constraints, true);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 2 && defined(__AVX__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256
do_test<dim, fe_degree, fe_degree + 1, double, VectorizedArray<double, 4>>(
dof, constraints, true);
#endif
-#if DEAL_II_COMPILER_VECTORIZATION_LEVEL >= 3 && defined(__AVX512F__)
+#if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 512
do_test<dim, fe_degree, fe_degree + 1, double, VectorizedArray<double, 8>>(
dof, constraints, true);
#endif