From b4bb428d9bdfcac481870518b253b97c59175058 Mon Sep 17 00:00:00 2001 From: paboyle Date: Sun, 14 Jan 2018 23:59:57 +0000 Subject: [PATCH] Namespace, indent --- lib/lattice/Lattice_local.h | 78 ++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/lib/lattice/Lattice_local.h b/lib/lattice/Lattice_local.h index 9dae1cd9..97e118f0 100644 --- a/lib/lattice/Lattice_local.h +++ b/lib/lattice/Lattice_local.h @@ -1,4 +1,4 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -23,8 +23,8 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #ifndef GRID_LATTICE_LOCALREDUCTION_H #define GRID_LATTICE_LOCALREDUCTION_H @@ -32,44 +32,44 @@ Author: Peter Boyle // localInner, localNorm, outerProduct /////////////////////////////////////////////// -namespace Grid { +NAMESPACE_BEGIN(Grid); - ///////////////////////////////////////////////////// - // Non site, reduced locally reduced routines - ///////////////////////////////////////////////////// +///////////////////////////////////////////////////// +// Non site, reduced locally reduced routines +///////////////////////////////////////////////////// - // localNorm2, - template - inline auto localNorm2 (const Lattice &rhs)-> Lattice - { - Lattice ret(rhs._grid); - parallel_for(int ss=0;ssoSites(); ss++){ - ret._odata[ss]=innerProduct(rhs._odata[ss],rhs._odata[ss]); - } - return ret; - } - - // localInnerProduct - template - inline auto localInnerProduct (const Lattice &lhs,const Lattice &rhs) -> Lattice - { - Lattice ret(rhs._grid); - parallel_for(int ss=0;ssoSites(); ss++){ - ret._odata[ss]=innerProduct(lhs._odata[ss],rhs._odata[ss]); - } - return ret; - } - - // outerProduct Scalar x Scalar -> Scalar - // Vector x Vector -> Matrix - template - inline auto outerProduct (const Lattice &lhs,const Lattice &rhs) -> Lattice - { - Lattice ret(rhs._grid); - parallel_for(int ss=0;ssoSites(); ss++){ - ret._odata[ss]=outerProduct(lhs._odata[ss],rhs._odata[ss]); - } - return ret; +// localNorm2, +template +inline auto localNorm2 (const Lattice &rhs)-> Lattice +{ + Lattice ret(rhs._grid); + parallel_for(int ss=0;ssoSites(); ss++){ + ret._odata[ss]=innerProduct(rhs._odata[ss],rhs._odata[ss]); } + return ret; } + +// localInnerProduct +template +inline auto localInnerProduct (const Lattice &lhs,const Lattice &rhs) -> Lattice +{ + Lattice ret(rhs._grid); + parallel_for(int ss=0;ssoSites(); ss++){ + ret._odata[ss]=innerProduct(lhs._odata[ss],rhs._odata[ss]); + } + return ret; +} + +// outerProduct Scalar x Scalar -> Scalar +// Vector x Vector -> Matrix +template +inline auto outerProduct (const Lattice &lhs,const Lattice &rhs) -> Lattice +{ + Lattice ret(rhs._grid); + parallel_for(int ss=0;ssoSites(); ss++){ + ret._odata[ss]=outerProduct(lhs._odata[ss],rhs._odata[ss]); + } + return ret; +} +NAMESPACE_END(Grid); #endif