From: Daniel Arndt Date: Thu, 3 Jun 2021 16:18:18 +0000 (-0400) Subject: Remove deprecated VectorizedArray::n_array_elements X-Git-Tag: v9.4.0-rc1~1283^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12385%2Fhead;p=dealii.git Remove deprecated VectorizedArray::n_array_elements --- diff --git a/doc/news/changes/incompatibilities/20210603DanielArndt-1 b/doc/news/changes/incompatibilities/20210603DanielArndt-1 new file mode 100644 index 0000000000..dac038504f --- /dev/null +++ b/doc/news/changes/incompatibilities/20210603DanielArndt-1 @@ -0,0 +1,4 @@ +Removed: The deprecated member variable VectorizedArray::n_array_elements has +been removed. +
+(Daniel Arndt, 2021/06/03) diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index a58a4aaf04..56915f746c 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -395,15 +395,6 @@ public: */ using value_type = Number; - /** - * This gives the number of elements collected in this class. In the general - * case, there is only one element. Specializations use SIMD intrinsics and - * can work on multiple elements at the same time. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 1; - static_assert(width == 1, "You specified an illegal width that is not supported."); @@ -696,12 +687,6 @@ private: -// We need to have a separate declaration for static const members -template -const unsigned int VectorizedArray::n_array_elements; - - - /** * @name Packing and unpacking of a VectorizedArray */ @@ -941,13 +926,6 @@ public: */ using value_type = double; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 8; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. @@ -1495,13 +1473,6 @@ public: */ using value_type = float; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 16; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. @@ -2145,13 +2116,6 @@ public: */ using value_type = double; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 4; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. @@ -2658,13 +2622,6 @@ public: */ using value_type = float; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 8; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. @@ -3205,13 +3162,6 @@ public: */ using value_type = double; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 2; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. @@ -3648,13 +3598,6 @@ public: */ using value_type = float; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 4; - /** * This function can be used to set all data fields to a given scalar. */ @@ -4129,13 +4072,6 @@ public: */ using value_type = double; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 2; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. @@ -4370,13 +4306,6 @@ public: */ using value_type = float; - /** - * This gives the number of vectors collected in this class. - * - * @deprecated Use VectorizedArrayBase::size() instead. - */ - DEAL_II_DEPRECATED static const unsigned int n_array_elements = 4; - /** * Default empty constructor, leaving the data in an uninitialized state * similar to float/double. diff --git a/source/base/vectorization.cc b/source/base/vectorization.cc index fc662d8f30..385434793c 100644 --- a/source/base/vectorization.cc +++ b/source/base/vectorization.cc @@ -30,27 +30,4 @@ static_assert(std::is_standard_layout>::value && std::is_trivial>::value, "VectorizedArray must be a POD type"); -// 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::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::n_array_elements; -const unsigned int VectorizedArray::n_array_elements; -# endif - -# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 256 -const unsigned int VectorizedArray::n_array_elements; -const unsigned int VectorizedArray::n_array_elements; -# endif - -# if DEAL_II_VECTORIZATION_WIDTH_IN_BITS >= 128 -const unsigned int VectorizedArray::n_array_elements; -const unsigned int VectorizedArray::n_array_elements; -# endif -#endif - DEAL_II_NAMESPACE_CLOSE diff --git a/tests/matrix_free/compute_diagonal_03.cc b/tests/matrix_free/compute_diagonal_03.cc index e8e2cf4e56..2d305cd796 100644 --- a/tests/matrix_free/compute_diagonal_03.cc +++ b/tests/matrix_free/compute_diagonal_03.cc @@ -76,9 +76,7 @@ test() auto quadrature_point = phi.quadrature_point(q); VectorizedArrayType coefficient; - for (unsigned int v = 0; - v < VectorizedArrayType::n_array_elements; - v++) + for (unsigned int v = 0; v < VectorizedArrayType::size(); v++) { Point point; for (unsigned int d = 0; d < dim; d++)