From db8c0e758439a2b3e99981c98701c080287d4829 Mon Sep 17 00:00:00 2001 From: nmeyer-ur Date: Thu, 14 May 2020 23:17:35 +0200 Subject: [PATCH] replaced _x form with _m form when using even/odd predication --- Grid/simd/Grid_a64fx-2.h | 18 ++++++++++-------- Grid/simd/Grid_a64fx-fixedsize.h | 18 ++++++++++++------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/Grid/simd/Grid_a64fx-2.h b/Grid/simd/Grid_a64fx-2.h index 0419df5b..67690c01 100644 --- a/Grid/simd/Grid_a64fx-2.h +++ b/Grid/simd/Grid_a64fx-2.h @@ -422,7 +422,8 @@ struct Conj{ svbool_t pg1 = acle::pg1(); svbool_t pg_odd = acle::pg_odd(); typename acle::vt a_v = svld1(pg1, a.v); - typename acle::vt r_v = svneg_x(pg_odd, a_v); + //typename acle::vt r_v = svneg_x(pg_odd, a_v); + typename acle::vt r_v = svneg_m(pg_odd, a_v); svst1(pg1, out.v, r_v); return out; @@ -442,7 +443,7 @@ struct TimesMinusI{ typename acle::svuint tbl_swap_v = svld1(pg1, tbl_swap.v); typename acle::vt a_v = svld1(pg1, a.v); a_v = svtbl(a_v, tbl_swap_v); - typename acle::vt r_v = svneg_x(pg_odd, a_v); + typename acle::vt r_v = svneg_m(pg_odd, a_v); svst1(pg1, out.v, r_v); return out; @@ -462,7 +463,8 @@ struct TimesI{ typename acle::svuint tbl_swap_v = svld1(pg1, tbl_swap.v); typename acle::vt a_v = svld1(pg1, a.v); a_v = svtbl(a_v, tbl_swap_v); - typename acle::vt r_v = svneg_x(pg_even, a_v); + //typename acle::vt r_v = svneg_x(pg_even, a_v); + typename acle::vt r_v = svneg_m(pg_even, a_v); svst1(pg1, out.v, r_v); return out; @@ -593,7 +595,7 @@ struct Exchange{ -/* FIXME use svcreate etc. or switch to table lookup directly +/* FIXME use svcreate etc. or switch to table lookup directly template static inline void Exchange1(vec &out1, vec &out2, const vec &in1, const vec &in2){ @@ -613,11 +615,11 @@ struct Exchange{ svst4(pg4, (typename acle::pt*)out1.v, out1_v4); svst4(pg4, (typename acle::pt*)out2.v, out2_v4); } -*/ +*/ #define VECTOR_FOR(i, w, inc) \ for (unsigned int i = 0; i < w; i += inc) - + template static inline void Exchange1(vec &out1, vec &out2, const vec &in1, const vec &in2){ // FIXME @@ -625,14 +627,14 @@ struct Exchange{ const int w = W::r; unsigned int mask = w >> (n + 1); // std::cout << " Exchange "<::pg_odd(); - return svneg_x(pg_odd, a); + //return svneg_x(pg_odd, a); + return svneg_m(pg_odd, a); } // Complex double inline vecd operator()(vecd a){ pred pg_odd = acle::pg_odd(); - return svneg_x(pg_odd, a); + //return svneg_x(pg_odd, a); + return svneg_m(pg_odd, a); } }; @@ -401,7 +403,8 @@ struct TimesMinusI{ pred pg_odd = acle::pg_odd(); vecf a_v = svtbl(a, tbl_swap); - return svneg_x(pg_odd, a_v); + //return svneg_x(pg_odd, a_v); + return svneg_m(pg_odd, a_v); } // Complex double inline vecd operator()(vecd a, vecd b){ @@ -410,7 +413,8 @@ struct TimesMinusI{ pred pg_odd = acle::pg_odd(); vecd a_v = svtbl(a, tbl_swap); - return svneg_x(pg_odd, a_v); + //return svneg_x(pg_odd, a_v); + return svneg_m(pg_odd, a_v); } }; @@ -422,7 +426,8 @@ struct TimesI{ pred pg_even = acle::pg_even(); vecf a_v = svtbl(a, tbl_swap); - return svneg_x(pg_even, a_v); + //return svneg_x(pg_even, a_v); + return svneg_m(pg_even, a_v); } // Complex double inline vecd operator()(vecd a, vecd b){ @@ -431,7 +436,8 @@ struct TimesI{ pred pg_even = acle::pg_even(); vecd a_v = svtbl(a, tbl_swap); - return svneg_x(pg_even, a_v); + //return svneg_x(pg_even, a_v); + return svneg_m(pg_even, a_v); } };