From 044a292281a22302d3839a8b48bbcdd891f30903 Mon Sep 17 00:00:00 2001 From: paboyle Date: Sun, 14 Jan 2018 23:46:07 +0000 Subject: [PATCH] Namespace, indnet --- lib/qcd/action/fermion/CayleyFermion5D.cc | 89 +++++++++++------------ 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/lib/qcd/action/fermion/CayleyFermion5D.cc b/lib/qcd/action/fermion/CayleyFermion5D.cc index eace6484..9a014608 100644 --- a/lib/qcd/action/fermion/CayleyFermion5D.cc +++ b/lib/qcd/action/fermion/CayleyFermion5D.cc @@ -1,4 +1,4 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -26,31 +26,30 @@ Author: paboyle 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 */ #include #include #include -namespace Grid { -namespace QCD { +NAMESPACE_BEGIN(Grid); - template - CayleyFermion5D::CayleyFermion5D(GaugeField &_Umu, - GridCartesian &FiveDimGrid, - GridRedBlackCartesian &FiveDimRedBlackGrid, - GridCartesian &FourDimGrid, - GridRedBlackCartesian &FourDimRedBlackGrid, - RealD _mass,RealD _M5,const ImplParams &p) : - WilsonFermion5D(_Umu, - FiveDimGrid, - FiveDimRedBlackGrid, - FourDimGrid, - FourDimRedBlackGrid,_M5,p), - mass(_mass) - { - } +template +CayleyFermion5D::CayleyFermion5D(GaugeField &_Umu, + GridCartesian &FiveDimGrid, + GridRedBlackCartesian &FiveDimRedBlackGrid, + GridCartesian &FourDimGrid, + GridRedBlackCartesian &FourDimRedBlackGrid, + RealD _mass,RealD _M5,const ImplParams &p) : + WilsonFermion5D(_Umu, + FiveDimGrid, + FiveDimRedBlackGrid, + FourDimGrid, + FourDimRedBlackGrid,_M5,p), + mass(_mass) +{ +} template void CayleyFermion5D::Dminus(const FermionField &psi, FermionField &chi) @@ -548,35 +547,35 @@ void CayleyFermion5D::MooeeInternalCompute(int dag, int inv, Matm.resize(Ls*LLs); for(int s2=0;s2::iscomplex() ) { - sp[l] = PplusMat (l*istride+s1*ostride,s2); - sm[l] = PminusMat(l*istride+s1*ostride,s2); - } else { - // if real - scalar_type tmp; - tmp = PplusMat (l*istride+s1*ostride,s2); - sp[l] = scalar_type(tmp.real(),tmp.real()); - tmp = PminusMat(l*istride+s1*ostride,s2); - sm[l] = scalar_type(tmp.real(),tmp.real()); + for(int s1=0;s1::iscomplex() ) { + sp[l] = PplusMat (l*istride+s1*ostride,s2); + sm[l] = PminusMat(l*istride+s1*ostride,s2); + } else { + // if real + scalar_type tmp; + tmp = PplusMat (l*istride+s1*ostride,s2); + sp[l] = scalar_type(tmp.real(),tmp.real()); + tmp = PminusMat(l*istride+s1*ostride,s2); + sm[l] = scalar_type(tmp.real(),tmp.real()); + } } - } - Matp[LLs*s2+s1] = Vp; - Matm[LLs*s2+s1] = Vm; - }} + Matp[LLs*s2+s1] = Vp; + Matm[LLs*s2+s1] = Vm; + }} } - FermOpTemplateInstantiate(CayleyFermion5D); - GparityFermOpTemplateInstantiate(CayleyFermion5D); +FermOpTemplateInstantiate(CayleyFermion5D); +GparityFermOpTemplateInstantiate(CayleyFermion5D); -}} +NAMESPACE_END(Grid);