From 40699221e2df89769495a38b7130218cbc0aa328 Mon Sep 17 00:00:00 2001 From: paboyle Date: Tue, 6 Mar 2018 04:14:13 -0800 Subject: [PATCH] Dont alias lhs and rhs in a where statement --- lib/qcd/action/gauge/GaugeImplementations.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lib/qcd/action/gauge/GaugeImplementations.h b/lib/qcd/action/gauge/GaugeImplementations.h index a14aec1b..0c417e4e 100644 --- a/lib/qcd/action/gauge/GaugeImplementations.h +++ b/lib/qcd/action/gauge/GaugeImplementations.h @@ -102,11 +102,13 @@ public: Lattice> coor(grid); LatticeCoordinate(coor, mu); - GaugeLinkField tmp(grid); - tmp = adj(Link); - tmp = where(coor == Lmu, conjugate(tmp), tmp); - return Cshift(tmp, mu, -1); // moves towards positive mu + GaugeLinkField tmp1(grid); + GaugeLinkField tmp2(grid); + tmp1 = adj(Link); + tmp2 = where(coor == Lmu, conjugate(tmp1), tmp1); + return Cshift(tmp2, mu, -1); // moves towards positive mu } + static inline GaugeLinkField CovShiftIdentityForward(const GaugeLinkField &Link, int mu) { return Link; @@ -119,10 +121,11 @@ public: Lattice> coor(grid); LatticeCoordinate(coor, mu); - GaugeLinkField tmp(grid); - tmp = Cshift(Link, mu, 1); - tmp = where(coor == Lmu, conjugate(tmp), tmp); - return tmp; + GaugeLinkField tmp1(grid); + GaugeLinkField tmp2(grid); + tmp1 = Cshift(Link, mu, 1); + tmp2 = where(coor == Lmu, conjugate(tmp1), tmp1); + return tmp2; } static inline bool isPeriodicGaugeField(void) { return false; }