From 6b4c91a275da95a706d3ae77bd862d1f48f05e73 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.kempf@iwr.uni-heidelberg.de> Date: Thu, 1 Mar 2018 13:49:40 +0100 Subject: [PATCH] Make base_floatingpoint available for non-counted vector types --- dune/perftool/common/vectorclass.hh | 41 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/dune/perftool/common/vectorclass.hh b/dune/perftool/common/vectorclass.hh index 2c7d6586..4cdaa97c 100644 --- a/dune/perftool/common/vectorclass.hh +++ b/dune/perftool/common/vectorclass.hh @@ -11,48 +11,47 @@ #define BARRIER asm volatile("": : :"memory") -#ifndef ENABLE_COUNTER - -#include <dune/perftool/vectorclass/vectorclass.h> -#include <dune/perftool/vectorclass/vectormath_exp.h> -#include <dune/perftool/vectorclass/vectormath_trig.h> - -#else +template<typename T> +struct base_floatingpoint +{}; -#include <algorithm> +#ifndef ENABLE_COUNTER -#define VCL_NAMESPACE _vcl #include <dune/perftool/vectorclass/vectorclass.h> #include <dune/perftool/vectorclass/vectormath_exp.h> #include <dune/perftool/vectorclass/vectormath_trig.h> -#include <dune/perftool/common/opcounter.hh> - -#include <numeric> - - -template<typename T> -struct base_floatingpoint -{}; - template<> -struct base_floatingpoint<_vcl::Vec4d> +struct base_floatingpoint<Vec4d> { using value = double; }; template<> -struct base_floatingpoint<_vcl::Vec8d> +struct base_floatingpoint<Vec8d> { using value = double; }; template<> -struct base_floatingpoint<_vcl::Vec8f> +struct base_floatingpoint<Vec8f> { using value = float; }; +#else + +#include <algorithm> + +#define VCL_NAMESPACE _vcl +#include <dune/perftool/vectorclass/vectorclass.h> +#include <dune/perftool/vectorclass/vectormath_exp.h> +#include <dune/perftool/vectorclass/vectormath_trig.h> + +#include <dune/perftool/common/opcounter.hh> + +#include <numeric> + struct Vec4d { oc::OpCounter<double> _d[4]; -- GitLab