From 34e105d67b4de6411073e30eabb8324352fa0181 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 28 Jan 2019 14:15:57 +0100 Subject: [PATCH] Declare VectorizedArray::n_array_elemnts outside the class in the general case --- include/deal.II/base/vectorization.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; + /** -- 2.39.5