]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Declare VectorizedArray::n_array_elemnts outside the class in the general case 7650/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 28 Jan 2019 13:15:57 +0000 (14:15 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Mon, 28 Jan 2019 13:22:31 +0000 (14:22 +0100)
include/deal.II/base/vectorization.h

index 1a6d223e62a7e330ab5c9bec997badc1dc057907..3f82e165c52e5eb58150474f621f7f9a1ca02c82 100644 (file)
@@ -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<Number2> &, const VectorizedArray<Number2> &);
 };
 
+// We need to have a separate declaration for static const members
+template <typename Number>
+const unsigned int VectorizedArray<Number>::n_array_elements = 1;
+
 
 
 /**

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.