From: Daniel Arndt Date: Mon, 28 Jan 2019 13:15:57 +0000 (+0100) Subject: Declare VectorizedArray::n_array_elemnts outside the class in the general case X-Git-Tag: v9.1.0-rc1~397^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7650%2Fhead;p=dealii.git Declare VectorizedArray::n_array_elemnts outside the class in the general case --- diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index 1a6d223e62..3f82e165c5 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -174,9 +174,11 @@ class VectorizedArray { public: /** - * This gives the number of vectors collected in this class. + * 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. */ - static const unsigned int n_array_elements = 1; + static const unsigned int n_array_elements; // POD means that there should be no user-defined constructors, destructors // and copy functions (the standard is somewhat relaxed in C++2011, though). @@ -449,6 +451,10 @@ private: std::min(const VectorizedArray &, const VectorizedArray &); }; +// We need to have a separate declaration for static const members +template +const unsigned int VectorizedArray::n_array_elements = 1; + /**