diff --git a/lib/lattice/Lattice_base.h b/lib/lattice/Lattice_base.h index 014e443d..53d0dc87 100644 --- a/lib/lattice/Lattice_base.h +++ b/lib/lattice/Lattice_base.h @@ -27,13 +27,13 @@ with this program; if not, write to the Free Software Foundation, Inc., See the full license in the file "LICENSE" in the top level distribution directory *************************************************************************************/ -/* END LEGAL */ + /* END LEGAL */ #ifndef GRID_LATTICE_BASE_H #define GRID_LATTICE_BASE_H #define STREAMING_STORES -namespace Grid { +NAMESPACE_BEGIN(Grid); // TODO: // mac,real,imag @@ -59,28 +59,28 @@ extern int GridCshiftPermuteMap[4][16]; class LatticeBase { public: - virtual ~LatticeBase(void) = default; - GridBase *_grid; + virtual ~LatticeBase(void) = default; + GridBase *_grid; }; class LatticeExpressionBase {}; template class LatticeUnaryExpression : public std::pair > , public LatticeExpressionBase { - public: - LatticeUnaryExpression(const std::pair > &arg): std::pair >(arg) {}; +public: + LatticeUnaryExpression(const std::pair > &arg): std::pair >(arg) {}; }; template class LatticeBinaryExpression : public std::pair > , public LatticeExpressionBase { - public: - LatticeBinaryExpression(const std::pair > &arg): std::pair >(arg) {}; +public: + LatticeBinaryExpression(const std::pair > &arg): std::pair >(arg) {}; }; template class LatticeTrinaryExpression :public std::pair >, public LatticeExpressionBase { - public: - LatticeTrinaryExpression(const std::pair > &arg): std::pair >(arg) {}; +public: + LatticeTrinaryExpression(const std::pair > &arg): std::pair >(arg) {}; }; void inline conformable(GridBase *lhs,GridBase *rhs) @@ -92,19 +92,19 @@ template class Lattice : public LatticeBase { public: - int checkerboard; - Vector _odata; + int checkerboard; + Vector _odata; - // to pthread need a computable loop where loop induction is not required - int begin(void) { return 0;}; - int end(void) { return _odata.size(); } - vobj & operator[](int i) { return _odata[i]; }; - const vobj & operator[](int i) const { return _odata[i]; }; + // to pthread need a computable loop where loop induction is not required + int begin(void) { return 0;}; + int end(void) { return _odata.size(); } + vobj & operator[](int i) { return _odata[i]; }; + const vobj & operator[](int i) const { return _odata[i]; }; public: - typedef typename vobj::scalar_type scalar_type; - typedef typename vobj::vector_type vector_type; - typedef vobj vector_object; + typedef typename vobj::scalar_type scalar_type; + typedef typename vobj::vector_type vector_type; + typedef vobj vector_object; //////////////////////////////////////////////////////////////////////////////// // Expression Template closure support @@ -177,7 +177,7 @@ public: } //GridFromExpression is tricky to do template - Lattice(const LatticeUnaryExpression & expr) { + Lattice(const LatticeUnaryExpression & expr) { _grid = nullptr; GridFromExpression(_grid,expr); assert(_grid!=nullptr); @@ -303,25 +303,25 @@ public: } }; // class Lattice - template std::ostream& operator<< (std::ostream& stream, const Lattice &o){ - std::vector gcoor; - typedef typename vobj::scalar_object sobj; - sobj ss; - for(int g=0;g_gsites;g++){ - o._grid->GlobalIndexToGlobalCoor(g,gcoor); - peekSite(ss,o,gcoor); - stream<<"["; - for(int d=0;d std::ostream& operator<< (std::ostream& stream, const Lattice &o){ + std::vector gcoor; + typedef typename vobj::scalar_object sobj; + sobj ss; + for(int g=0;g_gsites;g++){ + o._grid->GlobalIndexToGlobalCoor(g,gcoor); + peekSite(ss,o,gcoor); + stream<<"["; + for(int d=0;d