mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Hide internal data
This commit is contained in:
parent
85771e97e9
commit
2b4067bb71
@ -356,35 +356,35 @@ template<class vobj> auto peekLorentz(const Lattice<vobj> &rhs,int i) -> decltyp
|
|||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
template<class vobj>
|
template<class vobj>
|
||||||
void pokeColour(Lattice<vobj> &lhs,
|
void pokeColour(Lattice<vobj> &lhs,
|
||||||
const Lattice<decltype(peekIndex<ColourIndex>(lhs._odata[0],0))> & rhs,
|
const Lattice<decltype(peekIndex<ColourIndex>(lhs[0],0))> & rhs,
|
||||||
int i)
|
int i)
|
||||||
{
|
{
|
||||||
PokeIndex<ColourIndex>(lhs,rhs,i);
|
PokeIndex<ColourIndex>(lhs,rhs,i);
|
||||||
}
|
}
|
||||||
template<class vobj>
|
template<class vobj>
|
||||||
void pokeColour(Lattice<vobj> &lhs,
|
void pokeColour(Lattice<vobj> &lhs,
|
||||||
const Lattice<decltype(peekIndex<ColourIndex>(lhs._odata[0],0,0))> & rhs,
|
const Lattice<decltype(peekIndex<ColourIndex>(lhs[0],0,0))> & rhs,
|
||||||
int i,int j)
|
int i,int j)
|
||||||
{
|
{
|
||||||
PokeIndex<ColourIndex>(lhs,rhs,i,j);
|
PokeIndex<ColourIndex>(lhs,rhs,i,j);
|
||||||
}
|
}
|
||||||
template<class vobj>
|
template<class vobj>
|
||||||
void pokeSpin(Lattice<vobj> &lhs,
|
void pokeSpin(Lattice<vobj> &lhs,
|
||||||
const Lattice<decltype(peekIndex<SpinIndex>(lhs._odata[0],0))> & rhs,
|
const Lattice<decltype(peekIndex<SpinIndex>(lhs[0],0))> & rhs,
|
||||||
int i)
|
int i)
|
||||||
{
|
{
|
||||||
PokeIndex<SpinIndex>(lhs,rhs,i);
|
PokeIndex<SpinIndex>(lhs,rhs,i);
|
||||||
}
|
}
|
||||||
template<class vobj>
|
template<class vobj>
|
||||||
void pokeSpin(Lattice<vobj> &lhs,
|
void pokeSpin(Lattice<vobj> &lhs,
|
||||||
const Lattice<decltype(peekIndex<SpinIndex>(lhs._odata[0],0,0))> & rhs,
|
const Lattice<decltype(peekIndex<SpinIndex>(lhs[0],0,0))> & rhs,
|
||||||
int i,int j)
|
int i,int j)
|
||||||
{
|
{
|
||||||
PokeIndex<SpinIndex>(lhs,rhs,i,j);
|
PokeIndex<SpinIndex>(lhs,rhs,i,j);
|
||||||
}
|
}
|
||||||
template<class vobj>
|
template<class vobj>
|
||||||
void pokeLorentz(Lattice<vobj> &lhs,
|
void pokeLorentz(Lattice<vobj> &lhs,
|
||||||
const Lattice<decltype(peekIndex<LorentzIndex>(lhs._odata[0],0))> & rhs,
|
const Lattice<decltype(peekIndex<LorentzIndex>(lhs[0],0))> & rhs,
|
||||||
int i)
|
int i)
|
||||||
{
|
{
|
||||||
PokeIndex<LorentzIndex>(lhs,rhs,i);
|
PokeIndex<LorentzIndex>(lhs,rhs,i);
|
||||||
@ -471,12 +471,12 @@ template<int Index,class vobj> inline vobj transposeColour(const vobj &lhs){
|
|||||||
// Trace lattice and non-lattice
|
// Trace lattice and non-lattice
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
template<int Index,class vobj>
|
template<int Index,class vobj>
|
||||||
inline auto traceSpin(const Lattice<vobj> &lhs) -> Lattice<decltype(traceIndex<SpinIndex>(lhs._odata[0]))>
|
inline auto traceSpin(const Lattice<vobj> &lhs) -> Lattice<decltype(traceIndex<SpinIndex>(lhs[0]))>
|
||||||
{
|
{
|
||||||
return traceIndex<SpinIndex>(lhs);
|
return traceIndex<SpinIndex>(lhs);
|
||||||
}
|
}
|
||||||
template<int Index,class vobj>
|
template<int Index,class vobj>
|
||||||
inline auto traceColour(const Lattice<vobj> &lhs) -> Lattice<decltype(traceIndex<ColourIndex>(lhs._odata[0]))>
|
inline auto traceColour(const Lattice<vobj> &lhs) -> Lattice<decltype(traceIndex<ColourIndex>(lhs[0]))>
|
||||||
{
|
{
|
||||||
return traceIndex<ColourIndex>(lhs);
|
return traceIndex<ColourIndex>(lhs);
|
||||||
}
|
}
|
||||||
|
@ -77,8 +77,8 @@ public:
|
|||||||
static inline void AddLink(Field &U, LinkField &W,
|
static inline void AddLink(Field &U, LinkField &W,
|
||||||
int mu) { // U[mu] += W
|
int mu) { // U[mu] += W
|
||||||
thread_loop ( (auto ss = 0; ss < U._grid->oSites(); ss++),{
|
thread_loop ( (auto ss = 0; ss < U._grid->oSites(); ss++),{
|
||||||
U._odata[ss]._internal[mu] =
|
U[ss]._internal[mu] =
|
||||||
U._odata[ss]._internal[mu] + W._odata[ss]._internal;
|
U[ss]._internal[mu] + W[ss]._internal;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ public:
|
|||||||
conformable(fcbgrid,V._grid);
|
conformable(fcbgrid,V._grid);
|
||||||
|
|
||||||
// Assert the checkerboard?? or code for either
|
// Assert the checkerboard?? or code for either
|
||||||
assert(U.checkerboard==Odd);
|
assert(U.Checkerboard()==Odd);
|
||||||
assert(V.checkerboard==U.checkerboard);
|
assert(V.Checkerboard()==U.Checkerboard());
|
||||||
|
|
||||||
// NOTE Guido: WE DO NOT WANT TO USE THE ucbgrid GRID FOR THE FORCE
|
// NOTE Guido: WE DO NOT WANT TO USE THE ucbgrid GRID FOR THE FORCE
|
||||||
// it is not conformable with the HMC force field
|
// it is not conformable with the HMC force field
|
||||||
@ -83,8 +83,8 @@ public:
|
|||||||
this->_Mat.MooeeInvDag(tmp1,tmp2); // even->even
|
this->_Mat.MooeeInvDag(tmp1,tmp2); // even->even
|
||||||
this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerNo);
|
this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerNo);
|
||||||
|
|
||||||
assert(ForceE.checkerboard==Even);
|
assert(ForceE.Checkerboard()==Even);
|
||||||
assert(ForceO.checkerboard==Odd);
|
assert(ForceO.Checkerboard()==Odd);
|
||||||
|
|
||||||
setCheckerboard(Force,ForceE);
|
setCheckerboard(Force,ForceE);
|
||||||
setCheckerboard(Force,ForceO);
|
setCheckerboard(Force,ForceO);
|
||||||
@ -106,8 +106,8 @@ public:
|
|||||||
conformable(fcbgrid,V._grid);
|
conformable(fcbgrid,V._grid);
|
||||||
|
|
||||||
// Assert the checkerboard?? or code for either
|
// Assert the checkerboard?? or code for either
|
||||||
assert(V.checkerboard==Odd);
|
assert(V.Checkerboard()==Odd);
|
||||||
assert(V.checkerboard==V.checkerboard);
|
assert(V.Checkerboard()==V.Checkerboard());
|
||||||
|
|
||||||
// NOTE Guido: WE DO NOT WANT TO USE THE ucbgrid GRID FOR THE FORCE
|
// NOTE Guido: WE DO NOT WANT TO USE THE ucbgrid GRID FOR THE FORCE
|
||||||
// it is not conformable with the HMC force field
|
// it is not conformable with the HMC force field
|
||||||
@ -127,8 +127,8 @@ public:
|
|||||||
this->_Mat.MooeeInv(tmp1,tmp2); // even->even
|
this->_Mat.MooeeInv(tmp1,tmp2); // even->even
|
||||||
this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerYes);
|
this->_Mat.MeoDeriv(ForceE,tmp2,V,DaggerYes);
|
||||||
|
|
||||||
assert(ForceE.checkerboard==Even);
|
assert(ForceE.Checkerboard()==Even);
|
||||||
assert(ForceO.checkerboard==Odd);
|
assert(ForceO.Checkerboard()==Odd);
|
||||||
|
|
||||||
setCheckerboard(Force,ForceE);
|
setCheckerboard(Force,ForceE);
|
||||||
setCheckerboard(Force,ForceO);
|
setCheckerboard(Force,ForceO);
|
||||||
|
@ -89,17 +89,17 @@ public:
|
|||||||
const vobj *temp, *t_p;
|
const vobj *temp, *t_p;
|
||||||
|
|
||||||
SE = phiStencil.GetEntry(permute_type, mu, i);
|
SE = phiStencil.GetEntry(permute_type, mu, i);
|
||||||
t_p = &p._odata[i];
|
t_p = &p[i];
|
||||||
if ( SE->_is_local ) {
|
if ( SE->_is_local ) {
|
||||||
temp = &p._odata[SE->_offset];
|
temp = &p[SE->_offset];
|
||||||
if ( SE->_permute ) {
|
if ( SE->_permute ) {
|
||||||
permute(temp2, *temp, permute_type);
|
permute(temp2, *temp, permute_type);
|
||||||
action._odata[i] -= temp2*(*t_p) + (*t_p)*temp2;
|
action[i] -= temp2*(*t_p) + (*t_p)*temp2;
|
||||||
} else {
|
} else {
|
||||||
action._odata[i] -= (*temp)*(*t_p) + (*t_p)*(*temp);
|
action[i] -= (*temp)*(*t_p) + (*t_p)*(*temp);
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
// action -= pshift*p + p*pshift;
|
||||||
@ -126,15 +126,15 @@ public:
|
|||||||
SE = phiStencil.GetEntry(permute_type, point, i);
|
SE = phiStencil.GetEntry(permute_type, point, i);
|
||||||
|
|
||||||
if ( SE->_is_local ) {
|
if ( SE->_is_local ) {
|
||||||
temp = &p._odata[SE->_offset];
|
temp = &p[SE->_offset];
|
||||||
if ( SE->_permute ) {
|
if ( SE->_permute ) {
|
||||||
permute(temp2, *temp, permute_type);
|
permute(temp2, *temp, permute_type);
|
||||||
force._odata[i] -= temp2;
|
force[i] -= temp2;
|
||||||
} else {
|
} else {
|
||||||
force._odata[i] -= *temp;
|
force[i] -= *temp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
force._odata[i] -= phiStencil.CommBuf()[SE->_offset];
|
force[i] -= phiStencil.CommBuf()[SE->_offset];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ NAMESPACE_BEGIN(Grid);
|
|||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void axpibg5x(Lattice<vobj> &z,const Lattice<vobj> &x,Coeff a,Coeff b)
|
void axpibg5x(Lattice<vobj> &z,const Lattice<vobj> &x,Coeff a,Coeff b)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
|
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
@ -50,30 +50,30 @@ void axpibg5x(Lattice<vobj> &z,const Lattice<vobj> &x,Coeff a,Coeff b)
|
|||||||
Gamma G5(Gamma::Algebra::Gamma5);
|
Gamma G5(Gamma::Algebra::Gamma5);
|
||||||
parallel_for(int ss=0;ss<grid->oSites();ss++){
|
parallel_for(int ss=0;ss<grid->oSites();ss++){
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
tmp = a*x._odata[ss];
|
tmp = a*x[ss];
|
||||||
tmp = tmp + G5*(b*timesI(x._odata[ss]));
|
tmp = tmp + G5*(b*timesI(x[ss]));
|
||||||
vstream(z._odata[ss],tmp);
|
vstream(z[ss],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void axpby_ssp(Lattice<vobj> &z, Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
void axpby_ssp(Lattice<vobj> &z, Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,y);
|
conformable(x,y);
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp = a*x._odata[ss+s]+b*y._odata[ss+sp];
|
vobj tmp = a*x[ss+s]+b*y[ss+sp];
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z[ss+s],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void ag5xpby_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
void ag5xpby_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,y);
|
conformable(x,y);
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
@ -82,16 +82,16 @@ void ag5xpby_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const L
|
|||||||
Gamma G5(Gamma::Algebra::Gamma5);
|
Gamma G5(Gamma::Algebra::Gamma5);
|
||||||
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
tmp = G5*x._odata[ss+s]*a;
|
tmp = G5*x[ss+s]*a;
|
||||||
tmp = tmp + b*y._odata[ss+sp];
|
tmp = tmp + b*y[ss+sp];
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z[ss+s],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void axpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
void axpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,y);
|
conformable(x,y);
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
@ -99,16 +99,16 @@ void axpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const L
|
|||||||
Gamma G5(Gamma::Algebra::Gamma5);
|
Gamma G5(Gamma::Algebra::Gamma5);
|
||||||
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
tmp = G5*y._odata[ss+sp]*b;
|
tmp = G5*y[ss+sp]*b;
|
||||||
tmp = tmp + a*x._odata[ss+s];
|
tmp = tmp + a*x[ss+s];
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z[ss+s],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void ag5xpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
void ag5xpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,y);
|
conformable(x,y);
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
@ -118,41 +118,41 @@ void ag5xpbg5y_ssp(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const
|
|||||||
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp1;
|
vobj tmp1;
|
||||||
vobj tmp2;
|
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;
|
tmp2 = G5*tmp1;
|
||||||
vstream(z._odata[ss+s],tmp2);
|
vstream(z[ss+s],tmp2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void axpby_ssp_pminus(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
void axpby_ssp_pminus(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,y);
|
conformable(x,y);
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
spProj5m(tmp,y._odata[ss+sp]);
|
spProj5m(tmp,y[ss+sp]);
|
||||||
tmp = a*x._odata[ss+s]+b*tmp;
|
tmp = a*x[ss+s]+b*tmp;
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z[ss+s],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class vobj,class Coeff>
|
template<class vobj,class Coeff>
|
||||||
void axpby_ssp_pplus(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
void axpby_ssp_pplus(Lattice<vobj> &z,Coeff a,const Lattice<vobj> &x,Coeff b,const Lattice<vobj> &y,int s,int sp)
|
||||||
{
|
{
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,y);
|
conformable(x,y);
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
parallel_for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
spProj5p(tmp,y._odata[ss+sp]);
|
spProj5p(tmp,y[ss+sp]);
|
||||||
tmp = a*x._odata[ss+s]+b*tmp;
|
tmp = a*x[ss+s]+b*tmp;
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z[ss+s],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ template<class vobj>
|
|||||||
void G5R5(Lattice<vobj> &z,const Lattice<vobj> &x)
|
void G5R5(Lattice<vobj> &z,const Lattice<vobj> &x)
|
||||||
{
|
{
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
z.checkerboard = x.checkerboard;
|
z.Checkerboard() = x.Checkerboard();
|
||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
Gamma G5(Gamma::Algebra::Gamma5);
|
Gamma G5(Gamma::Algebra::Gamma5);
|
||||||
@ -168,8 +168,8 @@ void G5R5(Lattice<vobj> &z,const Lattice<vobj> &x)
|
|||||||
vobj tmp;
|
vobj tmp;
|
||||||
for(int s=0;s<Ls;s++){
|
for(int s=0;s<Ls;s++){
|
||||||
int sp = Ls-1-s;
|
int sp = Ls-1-s;
|
||||||
tmp = G5*x._odata[ss+s];
|
tmp = G5*x[ss+s];
|
||||||
vstream(z._odata[ss+sp],tmp);
|
vstream(z[ss+sp],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,19 +224,19 @@ public:
|
|||||||
su2SubGroupIndex(i0, i1, su2_index);
|
su2SubGroupIndex(i0, i1, su2_index);
|
||||||
|
|
||||||
parallel_for (int ss = 0; ss < grid->oSites(); ss++) {
|
parallel_for (int ss = 0; ss < grid->oSites(); ss++) {
|
||||||
subgroup._odata[ss]()()(0, 0) = source._odata[ss]()()(i0, i0);
|
subgroup[ss]()()(0, 0) = source[ss]()()(i0, i0);
|
||||||
subgroup._odata[ss]()()(0, 1) = source._odata[ss]()()(i0, i1);
|
subgroup[ss]()()(0, 1) = source[ss]()()(i0, i1);
|
||||||
subgroup._odata[ss]()()(1, 0) = source._odata[ss]()()(i1, i0);
|
subgroup[ss]()()(1, 0) = source[ss]()()(i1, i0);
|
||||||
subgroup._odata[ss]()()(1, 1) = source._odata[ss]()()(i1, i1);
|
subgroup[ss]()()(1, 1) = source[ss]()()(i1, i1);
|
||||||
|
|
||||||
iSU2Matrix<vcplx> Sigma = subgroup._odata[ss];
|
iSU2Matrix<vcplx> Sigma = subgroup[ss];
|
||||||
|
|
||||||
Sigma = Sigma - adj(Sigma) + trace(adj(Sigma));
|
Sigma = Sigma - adj(Sigma) + trace(adj(Sigma));
|
||||||
|
|
||||||
subgroup._odata[ss] = Sigma;
|
subgroup[ss] = Sigma;
|
||||||
|
|
||||||
// this should be purely real
|
// this should be purely real
|
||||||
Determinant._odata[ss] =
|
Determinant[ss] =
|
||||||
Sigma()()(0, 0) * Sigma()()(1, 1) - Sigma()()(0, 1) * Sigma()()(1, 0);
|
Sigma()()(0, 0) * Sigma()()(1, 1) - Sigma()()(0, 1) * Sigma()()(1, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -254,10 +254,10 @@ public:
|
|||||||
|
|
||||||
dest = 1.0; // start out with identity
|
dest = 1.0; // start out with identity
|
||||||
parallel_for (int ss = 0; ss < grid->oSites(); ss++) {
|
parallel_for (int ss = 0; ss < grid->oSites(); ss++) {
|
||||||
dest._odata[ss]()()(i0, i0) = subgroup._odata[ss]()()(0, 0);
|
dest[ss]()()(i0, i0) = subgroup[ss]()()(0, 0);
|
||||||
dest._odata[ss]()()(i0, i1) = subgroup._odata[ss]()()(0, 1);
|
dest[ss]()()(i0, i1) = subgroup[ss]()()(0, 1);
|
||||||
dest._odata[ss]()()(i1, i0) = subgroup._odata[ss]()()(1, 0);
|
dest[ss]()()(i1, i0) = subgroup[ss]()()(1, 0);
|
||||||
dest._odata[ss]()()(i1, i1) = subgroup._odata[ss]()()(1, 1);
|
dest[ss]()()(i1, i1) = subgroup[ss]()()(1, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user