From 1be80896048e42c825f81a6bc5a26d79c537f37d Mon Sep 17 00:00:00 2001 From: paboyle Date: Thu, 26 Apr 2018 23:42:45 +0100 Subject: [PATCH] Clean compile --- lib/lattice/Lattice_comparison_utils.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/lattice/Lattice_comparison_utils.h b/lib/lattice/Lattice_comparison_utils.h index 579449f1..cbac20ec 100644 --- a/lib/lattice/Lattice_comparison_utils.h +++ b/lib/lattice/Lattice_comparison_utils.h @@ -179,7 +179,7 @@ namespace Grid { return ret; } -#define DECLARE_RELATIONAL(op,functor) \ +#define DECLARE_RELATIONAL_EQ(op,functor) \ template = 0>\ inline vInteger operator op (const vsimd & lhs, const vsimd & rhs)\ {\ @@ -198,11 +198,6 @@ namespace Grid { typedef typename vsimd::scalar_type scalar;\ return Comparison(functor(),lhs,rhs);\ }\ - template\ - inline vInteger operator op(const iScalar &lhs,const iScalar &rhs)\ - { \ - return lhs._internal op rhs._internal; \ - } \ template\ inline vInteger operator op(const iScalar &lhs,const typename vsimd::scalar_type &rhs) \ { \ @@ -214,12 +209,19 @@ namespace Grid { return lhs op rhs._internal; \ } \ +#define DECLARE_RELATIONAL(op,functor) \ + DECLARE_RELATIONAL_EQ(op,functor) \ + template\ + inline vInteger operator op(const iScalar &lhs,const iScalar &rhs)\ + { \ + return lhs._internal op rhs._internal; \ + } DECLARE_RELATIONAL(<,slt); DECLARE_RELATIONAL(<=,sle); DECLARE_RELATIONAL(>,sgt); DECLARE_RELATIONAL(>=,sge); -DECLARE_RELATIONAL(==,seq); +DECLARE_RELATIONAL_EQ(==,seq); DECLARE_RELATIONAL(!=,sne); #undef DECLARE_RELATIONAL