diff --git a/lib/qcd/QCD.h b/lib/qcd/QCD.h index 945d173b..a93bb951 100644 --- a/lib/qcd/QCD.h +++ b/lib/qcd/QCD.h @@ -356,35 +356,35 @@ template auto peekLorentz(const Lattice &rhs,int i) -> decltyp ////////////////////////////////////////////// template void pokeColour(Lattice &lhs, - const Lattice(lhs._odata[0],0))> & rhs, + const Lattice(lhs[0],0))> & rhs, int i) { PokeIndex(lhs,rhs,i); } template void pokeColour(Lattice &lhs, - const Lattice(lhs._odata[0],0,0))> & rhs, + const Lattice(lhs[0],0,0))> & rhs, int i,int j) { PokeIndex(lhs,rhs,i,j); } template void pokeSpin(Lattice &lhs, - const Lattice(lhs._odata[0],0))> & rhs, + const Lattice(lhs[0],0))> & rhs, int i) { PokeIndex(lhs,rhs,i); } template void pokeSpin(Lattice &lhs, - const Lattice(lhs._odata[0],0,0))> & rhs, + const Lattice(lhs[0],0,0))> & rhs, int i,int j) { PokeIndex(lhs,rhs,i,j); } template void pokeLorentz(Lattice &lhs, - const Lattice(lhs._odata[0],0))> & rhs, + const Lattice(lhs[0],0))> & rhs, int i) { PokeIndex(lhs,rhs,i); @@ -471,12 +471,12 @@ template inline vobj transposeColour(const vobj &lhs){ // Trace lattice and non-lattice ////////////////////////////////////////// template -inline auto traceSpin(const Lattice &lhs) -> Lattice(lhs._odata[0]))> +inline auto traceSpin(const Lattice &lhs) -> Lattice(lhs[0]))> { return traceIndex(lhs); } template -inline auto traceColour(const Lattice &lhs) -> Lattice(lhs._odata[0]))> +inline auto traceColour(const Lattice &lhs) -> Lattice(lhs[0]))> { return traceIndex(lhs); } diff --git a/lib/qcd/action/gauge/GaugeImplTypes.h b/lib/qcd/action/gauge/GaugeImplTypes.h index 197f0c73..490c4d30 100644 --- a/lib/qcd/action/gauge/GaugeImplTypes.h +++ b/lib/qcd/action/gauge/GaugeImplTypes.h @@ -77,8 +77,8 @@ public: static inline void AddLink(Field &U, LinkField &W, int mu) { // U[mu] += W thread_loop ( (auto ss = 0; ss < U._grid->oSites(); ss++),{ - U._odata[ss]._internal[mu] = - U._odata[ss]._internal[mu] + W._odata[ss]._internal; + U[ss]._internal[mu] = + U[ss]._internal[mu] + W[ss]._internal; }); } diff --git a/lib/qcd/action/pseudofermion/EvenOddSchurDifferentiable.h b/lib/qcd/action/pseudofermion/EvenOddSchurDifferentiable.h index b19f608f..9f07c9e9 100644 --- a/lib/qcd/action/pseudofermion/EvenOddSchurDifferentiable.h +++ b/lib/qcd/action/pseudofermion/EvenOddSchurDifferentiable.h @@ -61,8 +61,8 @@ public: conformable(fcbgrid,V._grid); // Assert the checkerboard?? or code for either - assert(U.checkerboard==Odd); - assert(V.checkerboard==U.checkerboard); + assert(U.Checkerboard()==Odd); + assert(V.Checkerboard()==U.Checkerboard()); // NOTE Guido: WE DO NOT WANT TO USE THE ucbgrid GRID FOR THE FORCE // it is not conformable with the HMC force field @@ -83,8 +83,8 @@ public: this->_Mat.MooeeInvDag(tmp1,tmp2); // even->even this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerNo); - assert(ForceE.checkerboard==Even); - assert(ForceO.checkerboard==Odd); + assert(ForceE.Checkerboard()==Even); + assert(ForceO.Checkerboard()==Odd); setCheckerboard(Force,ForceE); setCheckerboard(Force,ForceO); @@ -106,8 +106,8 @@ public: conformable(fcbgrid,V._grid); // Assert the checkerboard?? or code for either - assert(V.checkerboard==Odd); - assert(V.checkerboard==V.checkerboard); + assert(V.Checkerboard()==Odd); + assert(V.Checkerboard()==V.Checkerboard()); // NOTE Guido: WE DO NOT WANT TO USE THE ucbgrid GRID FOR THE FORCE // it is not conformable with the HMC force field @@ -127,8 +127,8 @@ public: this->_Mat.MooeeInv(tmp1,tmp2); // even->even this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerYes); - assert(ForceE.checkerboard==Even); - assert(ForceO.checkerboard==Odd); + assert(ForceE.Checkerboard()==Even); + assert(ForceO.Checkerboard()==Odd); setCheckerboard(Force,ForceE); setCheckerboard(Force,ForceO); diff --git a/lib/qcd/action/scalar/ScalarInteractionAction.h b/lib/qcd/action/scalar/ScalarInteractionAction.h index 97547655..ee561f0f 100644 --- a/lib/qcd/action/scalar/ScalarInteractionAction.h +++ b/lib/qcd/action/scalar/ScalarInteractionAction.h @@ -89,17 +89,17 @@ public: const vobj *temp, *t_p; SE = phiStencil.GetEntry(permute_type, mu, i); - t_p = &p._odata[i]; + t_p = &p[i]; if ( SE->_is_local ) { - temp = &p._odata[SE->_offset]; + temp = &p[SE->_offset]; if ( SE->_permute ) { permute(temp2, *temp, permute_type); - action._odata[i] -= temp2*(*t_p) + (*t_p)*temp2; + action[i] -= temp2*(*t_p) + (*t_p)*temp2; } else { - action._odata[i] -= (*temp)*(*t_p) + (*t_p)*(*temp); + action[i] -= (*temp)*(*t_p) + (*t_p)*(*temp); } } else { - action._odata[i] -= phiStencil.CommBuf()[SE->_offset]*(*t_p) + (*t_p)*phiStencil.CommBuf()[SE->_offset]; + action[i] -= phiStencil.CommBuf()[SE->_offset]*(*t_p) + (*t_p)*phiStencil.CommBuf()[SE->_offset]; } } // action -= pshift*p + p*pshift; @@ -126,15 +126,15 @@ public: SE = phiStencil.GetEntry(permute_type, point, i); if ( SE->_is_local ) { - temp = &p._odata[SE->_offset]; + temp = &p[SE->_offset]; if ( SE->_permute ) { permute(temp2, *temp, permute_type); - force._odata[i] -= temp2; + force[i] -= temp2; } else { - force._odata[i] -= *temp; + force[i] -= *temp; } } else { - force._odata[i] -= phiStencil.CommBuf()[SE->_offset]; + force[i] -= phiStencil.CommBuf()[SE->_offset]; } } } diff --git a/lib/qcd/utils/LinalgUtils.h b/lib/qcd/utils/LinalgUtils.h index b96cb63c..e29dfa8d 100644 --- a/lib/qcd/utils/LinalgUtils.h +++ b/lib/qcd/utils/LinalgUtils.h @@ -42,7 +42,7 @@ NAMESPACE_BEGIN(Grid); template void axpibg5x(Lattice &z,const Lattice &x,Coeff a,Coeff b) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,z); GridBase *grid=x._grid; @@ -50,30 +50,30 @@ void axpibg5x(Lattice &z,const Lattice &x,Coeff a,Coeff b) Gamma G5(Gamma::Algebra::Gamma5); parallel_for(int ss=0;ssoSites();ss++){ vobj tmp; - tmp = a*x._odata[ss]; - tmp = tmp + G5*(b*timesI(x._odata[ss])); - vstream(z._odata[ss],tmp); + tmp = a*x[ss]; + tmp = tmp + G5*(b*timesI(x[ss])); + vstream(z[ss],tmp); } } template void axpby_ssp(Lattice &z, Coeff a,const Lattice &x,Coeff b,const Lattice &y,int s,int sp) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,y); conformable(x,z); GridBase *grid=x._grid; int Ls = grid->_rdimensions[0]; parallel_for(int ss=0;ssoSites();ss+=Ls){ // adds Ls - vobj tmp = a*x._odata[ss+s]+b*y._odata[ss+sp]; - vstream(z._odata[ss+s],tmp); + vobj tmp = a*x[ss+s]+b*y[ss+sp]; + vstream(z[ss+s],tmp); } } template void ag5xpby_ssp(Lattice &z,Coeff a,const Lattice &x,Coeff b,const Lattice &y,int s,int sp) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,y); conformable(x,z); GridBase *grid=x._grid; @@ -82,16 +82,16 @@ void ag5xpby_ssp(Lattice &z,Coeff a,const Lattice &x,Coeff b,const L Gamma G5(Gamma::Algebra::Gamma5); parallel_for(int ss=0;ssoSites();ss+=Ls){ // adds Ls vobj tmp; - tmp = G5*x._odata[ss+s]*a; - tmp = tmp + b*y._odata[ss+sp]; - vstream(z._odata[ss+s],tmp); + tmp = G5*x[ss+s]*a; + tmp = tmp + b*y[ss+sp]; + vstream(z[ss+s],tmp); } } template void axpbg5y_ssp(Lattice &z,Coeff a,const Lattice &x,Coeff b,const Lattice &y,int s,int sp) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,y); conformable(x,z); GridBase *grid=x._grid; @@ -99,16 +99,16 @@ void axpbg5y_ssp(Lattice &z,Coeff a,const Lattice &x,Coeff b,const L Gamma G5(Gamma::Algebra::Gamma5); parallel_for(int ss=0;ssoSites();ss+=Ls){ // adds Ls vobj tmp; - tmp = G5*y._odata[ss+sp]*b; - tmp = tmp + a*x._odata[ss+s]; - vstream(z._odata[ss+s],tmp); + tmp = G5*y[ss+sp]*b; + tmp = tmp + a*x[ss+s]; + vstream(z[ss+s],tmp); } } template void ag5xpbg5y_ssp(Lattice &z,Coeff a,const Lattice &x,Coeff b,const Lattice &y,int s,int sp) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,y); conformable(x,z); GridBase *grid=x._grid; @@ -118,41 +118,41 @@ void ag5xpbg5y_ssp(Lattice &z,Coeff a,const Lattice &x,Coeff b,const parallel_for(int ss=0;ssoSites();ss+=Ls){ // adds Ls vobj tmp1; vobj tmp2; - tmp1 = a*x._odata[ss+s]+b*y._odata[ss+sp]; + tmp1 = a*x[ss+s]+b*y[ss+sp]; tmp2 = G5*tmp1; - vstream(z._odata[ss+s],tmp2); + vstream(z[ss+s],tmp2); } } template void axpby_ssp_pminus(Lattice &z,Coeff a,const Lattice &x,Coeff b,const Lattice &y,int s,int sp) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,y); conformable(x,z); GridBase *grid=x._grid; int Ls = grid->_rdimensions[0]; parallel_for(int ss=0;ssoSites();ss+=Ls){ // adds Ls vobj tmp; - spProj5m(tmp,y._odata[ss+sp]); - tmp = a*x._odata[ss+s]+b*tmp; - vstream(z._odata[ss+s],tmp); + spProj5m(tmp,y[ss+sp]); + tmp = a*x[ss+s]+b*tmp; + vstream(z[ss+s],tmp); } } template void axpby_ssp_pplus(Lattice &z,Coeff a,const Lattice &x,Coeff b,const Lattice &y,int s,int sp) { - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,y); conformable(x,z); GridBase *grid=x._grid; int Ls = grid->_rdimensions[0]; parallel_for(int ss=0;ssoSites();ss+=Ls){ // adds Ls vobj tmp; - spProj5p(tmp,y._odata[ss+sp]); - tmp = a*x._odata[ss+s]+b*tmp; - vstream(z._odata[ss+s],tmp); + spProj5p(tmp,y[ss+sp]); + tmp = a*x[ss+s]+b*tmp; + vstream(z[ss+s],tmp); } } @@ -160,7 +160,7 @@ template void G5R5(Lattice &z,const Lattice &x) { GridBase *grid=x._grid; - z.checkerboard = x.checkerboard; + z.Checkerboard() = x.Checkerboard(); conformable(x,z); int Ls = grid->_rdimensions[0]; Gamma G5(Gamma::Algebra::Gamma5); @@ -168,8 +168,8 @@ void G5R5(Lattice &z,const Lattice &x) vobj tmp; for(int s=0;soSites(); ss++) { - subgroup._odata[ss]()()(0, 0) = source._odata[ss]()()(i0, i0); - subgroup._odata[ss]()()(0, 1) = source._odata[ss]()()(i0, i1); - subgroup._odata[ss]()()(1, 0) = source._odata[ss]()()(i1, i0); - subgroup._odata[ss]()()(1, 1) = source._odata[ss]()()(i1, i1); + subgroup[ss]()()(0, 0) = source[ss]()()(i0, i0); + subgroup[ss]()()(0, 1) = source[ss]()()(i0, i1); + subgroup[ss]()()(1, 0) = source[ss]()()(i1, i0); + subgroup[ss]()()(1, 1) = source[ss]()()(i1, i1); - iSU2Matrix Sigma = subgroup._odata[ss]; + iSU2Matrix Sigma = subgroup[ss]; Sigma = Sigma - adj(Sigma) + trace(adj(Sigma)); - subgroup._odata[ss] = Sigma; + subgroup[ss] = Sigma; // this should be purely real - Determinant._odata[ss] = + Determinant[ss] = Sigma()()(0, 0) * Sigma()()(1, 1) - Sigma()()(0, 1) * Sigma()()(1, 0); } } @@ -254,10 +254,10 @@ public: dest = 1.0; // start out with identity parallel_for (int ss = 0; ss < grid->oSites(); ss++) { - dest._odata[ss]()()(i0, i0) = subgroup._odata[ss]()()(0, 0); - dest._odata[ss]()()(i0, i1) = subgroup._odata[ss]()()(0, 1); - dest._odata[ss]()()(i1, i0) = subgroup._odata[ss]()()(1, 0); - dest._odata[ss]()()(i1, i1) = subgroup._odata[ss]()()(1, 1); + dest[ss]()()(i0, i0) = subgroup[ss]()()(0, 0); + dest[ss]()()(i0, i1) = subgroup[ss]()()(0, 1); + dest[ss]()()(i1, i0) = subgroup[ss]()()(1, 0); + dest[ss]()()(i1, i1) = subgroup[ss]()()(1, 1); } }