mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 11:15:55 +01:00
Gamma5 mult direct
This commit is contained in:
parent
145b807ba2
commit
2c216a42f9
@ -32,10 +32,11 @@ void ag5xpby_ssp(Lattice<vobj> &z,RealD a,const Lattice<vobj> &x,RealD b,const L
|
|||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
|
Gamma G5(Gamma::Gamma5);
|
||||||
PARALLEL_FOR_LOOP
|
PARALLEL_FOR_LOOP
|
||||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
multGamma5(tmp(),a*x._odata[ss+s]());
|
tmp = G5*x._odata[ss+s]*a;
|
||||||
tmp = tmp + b*y._odata[ss+sp];
|
tmp = tmp + b*y._odata[ss+sp];
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z._odata[ss+s],tmp);
|
||||||
}
|
}
|
||||||
@ -49,10 +50,11 @@ void axpbg5y_ssp(Lattice<vobj> &z,RealD a,const Lattice<vobj> &x,RealD b,const L
|
|||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
|
Gamma G5(Gamma::Gamma5);
|
||||||
PARALLEL_FOR_LOOP
|
PARALLEL_FOR_LOOP
|
||||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
vobj tmp;
|
vobj tmp;
|
||||||
multGamma5(tmp(),b*y._odata[ss+sp]());
|
tmp = G5*y._odata[ss+sp]*b;
|
||||||
tmp = tmp + a*x._odata[ss+s];
|
tmp = tmp + a*x._odata[ss+s];
|
||||||
vstream(z._odata[ss+s],tmp);
|
vstream(z._odata[ss+s],tmp);
|
||||||
}
|
}
|
||||||
@ -66,12 +68,13 @@ void ag5xpbg5y_ssp(Lattice<vobj> &z,RealD a,const Lattice<vobj> &x,RealD b,const
|
|||||||
conformable(x,z);
|
conformable(x,z);
|
||||||
GridBase *grid=x._grid;
|
GridBase *grid=x._grid;
|
||||||
int Ls = grid->_rdimensions[0];
|
int Ls = grid->_rdimensions[0];
|
||||||
|
Gamma G5(Gamma::Gamma5);
|
||||||
PARALLEL_FOR_LOOP
|
PARALLEL_FOR_LOOP
|
||||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
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._odata[ss+s]+b*y._odata[ss+sp];
|
||||||
multGamma5(tmp2(),tmp1());
|
tmp2 = G5*tmp1;
|
||||||
vstream(z._odata[ss+s],tmp2);
|
vstream(z._odata[ss+s],tmp2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,12 +120,13 @@ void G5R5(Lattice<vobj> &z,const Lattice<vobj> &x)
|
|||||||
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::Gamma5);
|
||||||
PARALLEL_FOR_LOOP
|
PARALLEL_FOR_LOOP
|
||||||
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
for(int ss=0;ss<grid->oSites();ss+=Ls){ // adds Ls
|
||||||
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;
|
||||||
multGamma5(tmp(),x._odata[ss+s]());
|
tmp = G5*x._odata[ss+s];
|
||||||
vstream(z._odata[ss+sp],tmp);
|
vstream(z._odata[ss+sp],tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user