From f70df6e1955107d83b62df323608f969a53c7c0e Mon Sep 17 00:00:00 2001 From: david clarke Date: Thu, 29 Feb 2024 12:29:30 -0700 Subject: [PATCH] changed NO_SHIFT and BACKWARD_CONST from define to enum --- Grid/qcd/smearing/HISQSmearing.h | 5 +---- Grid/stencil/GeneralLocalStencil.h | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Grid/qcd/smearing/HISQSmearing.h b/Grid/qcd/smearing/HISQSmearing.h index 6fc6993e..529ea090 100644 --- a/Grid/qcd/smearing/HISQSmearing.h +++ b/Grid/qcd/smearing/HISQSmearing.h @@ -138,7 +138,7 @@ public: for(int nu=0;nu Nd! @@ -150,16 +156,16 @@ public: inline int Back(const int dir) { // generalShift will use BACKWARD_CONST to determine whether we step forward or // backward. Trick inspired by SIMULATeQCD. - return dir + BACKWARD_CONST; + return dir + shiftSignal::BACKWARD_CONST; } /*! @brief shift one unit in direction dir */ template void generalShift(Coordinate& shift, int dir) { - if (dir >= BACKWARD_CONST) { - dir -= BACKWARD_CONST; + if (dir >= shiftSignal::BACKWARD_CONST) { + dir -= shiftSignal::BACKWARD_CONST; shift[dir]+=-1; - } else if (dir == NO_SHIFT) { + } else if (dir == shiftSignal::NO_SHIFT) { ; // do nothing } else { shift[dir]+=1; @@ -169,10 +175,10 @@ void generalShift(Coordinate& shift, int dir) { /*! @brief follow a path of directions, shifting one unit in each direction */ template void generalShift(Coordinate& shift, int dir, Args... args) { - if (dir >= BACKWARD_CONST) { - dir -= BACKWARD_CONST; + if (dir >= shiftSignal::BACKWARD_CONST) { + dir -= shiftSignal::BACKWARD_CONST; shift[dir]+=-1; - } else if (dir == NO_SHIFT) { + } else if (dir == shiftSignal::NO_SHIFT) { ; // do nothing } else { shift[dir]+=1;