From 85ef029d9cb292d6515dabdf3e7a9ce7f1357d20 Mon Sep 17 00:00:00 2001
From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de>
Date: Fri, 2 Mar 2018 11:40:08 +0100
Subject: [PATCH] Guard Vec8d template specialization with MAX_VECTOR_SIZE

---
 dune/perftool/common/vectorclass.hh | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/dune/perftool/common/vectorclass.hh b/dune/perftool/common/vectorclass.hh
index 4cdaa97c..494947f0 100644
--- a/dune/perftool/common/vectorclass.hh
+++ b/dune/perftool/common/vectorclass.hh
@@ -28,17 +28,21 @@ struct base_floatingpoint<Vec4d>
 };
 
 template<>
-struct base_floatingpoint<Vec8d>
+struct base_floatingpoint<Vec8f>
 {
-  using value = double;
+  using value = float;
 };
 
+#if MAX_VECTOR_SIZE >= 512
+
 template<>
-struct base_floatingpoint<Vec8f>
+struct base_floatingpoint<Vec8d>
 {
-  using value = float;
+  using value = double;
 };
 
+#endif
+
 #else
 
 #include <algorithm>
-- 
GitLab