mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-12 20:27:06 +01:00
big commit fixing nocompiles in defective C++11 compilers (gcc, icpc). stared getting to
near the bleeding edge I guess
This commit is contained in:
@ -35,7 +35,7 @@ void WilsonFermion::DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGauge
|
||||
conformable(Umu._grid,GaugeGrid());
|
||||
LatticeColourMatrix U(GaugeGrid());
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
U = peekIndex<LorentzIndex>(Umu,mu);
|
||||
U = PeekIndex<LorentzIndex>(Umu,mu);
|
||||
pokeIndex<LorentzIndex>(Uds,U,mu);
|
||||
U = adj(Cshift(U,mu,-1));
|
||||
pokeIndex<LorentzIndex>(Uds,U,mu+4);
|
||||
@ -109,7 +109,7 @@ void WilsonFermion::DhopDir(const LatticeFermion &in, LatticeFermion &out,int di
|
||||
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int sss=0;sss<in._grid->oSites();sss++){
|
||||
DiracOpt::DhopDir(Stencil,Umu,comm_buf,sss,sss,in,out,dirdisp);
|
||||
DiracOptDhopDir(Stencil,Umu,comm_buf,sss,sss,in,out,dirdisp);
|
||||
}
|
||||
|
||||
};
|
||||
@ -125,24 +125,24 @@ void WilsonFermion::DhopInternal(CartesianStencil & st,LatticeDoubledGaugeField
|
||||
if( HandOptDslash ) {
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int sss=0;sss<in._grid->oSites();sss++){
|
||||
DiracOptHand::DhopSiteDag(st,U,comm_buf,sss,sss,in,out);
|
||||
DiracOptHandDhopSiteDag(st,U,comm_buf,sss,sss,in,out);
|
||||
}
|
||||
} else {
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int sss=0;sss<in._grid->oSites();sss++){
|
||||
DiracOpt::DhopSiteDag(st,U,comm_buf,sss,sss,in,out);
|
||||
DiracOptDhopSiteDag(st,U,comm_buf,sss,sss,in,out);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if( HandOptDslash ) {
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int sss=0;sss<in._grid->oSites();sss++){
|
||||
DiracOptHand::DhopSite(st,U,comm_buf,sss,sss,in,out);
|
||||
DiracOptHandDhopSite(st,U,comm_buf,sss,sss,in,out);
|
||||
}
|
||||
} else {
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int sss=0;sss<in._grid->oSites();sss++){
|
||||
DiracOpt::DhopSite(st,U,comm_buf,sss,sss,in,out);
|
||||
DiracOptDhopSite(st,U,comm_buf,sss,sss,in,out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void WilsonFermion5D::DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGau
|
||||
conformable(Umu._grid,GaugeGrid());
|
||||
LatticeColourMatrix U(GaugeGrid());
|
||||
for(int mu=0;mu<Nd;mu++){
|
||||
U = peekIndex<LorentzIndex>(Umu,mu);
|
||||
U = PeekIndex<LorentzIndex>(Umu,mu);
|
||||
pokeIndex<LorentzIndex>(Uds,U,mu);
|
||||
U = adj(Cshift(U,mu,-1));
|
||||
pokeIndex<LorentzIndex>(Uds,U,mu+4);
|
||||
@ -105,7 +105,7 @@ void WilsonFermion5D::DhopDir(const LatticeFermion &in, LatticeFermion &out,int
|
||||
for(int s=0;s<Ls;s++){
|
||||
int sU=ss;
|
||||
int sF = s+Ls*sU;
|
||||
DiracOpt::DhopDir(Stencil,Umu,comm_buf,sF,sU,in,out,dirdisp);
|
||||
DiracOptDhopDir(Stencil,Umu,comm_buf,sF,sU,in,out,dirdisp);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -127,49 +127,47 @@ void WilsonFermion5D::DhopInternal(CartesianStencil & st, LebesgueOrder &lo,
|
||||
// - 8 linear access unit stride streams per thread for Fermion for hw prefetchable.
|
||||
if ( dag == DaggerYes ) {
|
||||
if( HandOptDslash ) {
|
||||
#pragma parallel for
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<U._grid->oSites();ss++){
|
||||
{
|
||||
for(int s=0;s<Ls;s++){
|
||||
int sU=ss;
|
||||
int sF = s+Ls*sU;
|
||||
DiracOptHand::DhopSiteDag(st,U,comm_buf,sF,sU,in,out);
|
||||
for(int s=0;s<Ls;s++){
|
||||
int sU=ss;
|
||||
int sF = s+Ls*sU;
|
||||
DiracOptHandDhopSiteDag(st,U,comm_buf,sF,sU,in,out);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
#pragma parallel for
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<U._grid->oSites();ss++){
|
||||
{
|
||||
int sd;
|
||||
for(sd=0;sd<Ls;sd++){
|
||||
int sU=ss;
|
||||
int sF = sd+Ls*sU;
|
||||
DiracOpt::DhopSiteDag(st,U,comm_buf,sF,sU,in,out);
|
||||
DiracOptDhopSiteDag(st,U,comm_buf,sF,sU,in,out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if( HandOptDslash ) {
|
||||
#pragma parallel for
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<U._grid->oSites();ss++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
// int sU=lo.Reorder(ss);
|
||||
int sU=ss;
|
||||
int sF = s+Ls*sU;
|
||||
DiracOptHand::DhopSite(st,U,comm_buf,sF,sU,in,out);
|
||||
DiracOptHandDhopSite(st,U,comm_buf,sF,sU,in,out);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
#pragma parallel for
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<U._grid->oSites();ss++){
|
||||
for(int s=0;s<Ls;s++){
|
||||
// int sU=lo.Reorder(ss);
|
||||
int sU=ss;
|
||||
int sF = s+Ls*sU;
|
||||
DiracOpt::DhopSite(st,U,comm_buf,sF,sU,in,out);
|
||||
DiracOptDhopSite(st,U,comm_buf,sF,sU,in,out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,16 +39,16 @@ namespace Grid {
|
||||
GridBase *FermionRedBlackGrid(void) { return _FiveDimRedBlackGrid;}
|
||||
|
||||
// full checkerboard operations; leave unimplemented as abstract for now
|
||||
//virtual RealD M (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
//virtual RealD Mdag (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
virtual RealD M (const LatticeFermion &in, LatticeFermion &out){assert(0); return 0.0;};
|
||||
virtual RealD Mdag (const LatticeFermion &in, LatticeFermion &out){assert(0); return 0.0;};
|
||||
|
||||
// half checkerboard operations; leave unimplemented as abstract for now
|
||||
// virtual void Meooe (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
// virtual void MeooeDag (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
// virtual void Mooee (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
// virtual void MooeeDag (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
// virtual void MooeeInv (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
// virtual void MooeeInvDag (const LatticeFermion &in, LatticeFermion &out)=0;
|
||||
virtual void Meooe (const LatticeFermion &in, LatticeFermion &out){assert(0);};
|
||||
virtual void MeooeDag (const LatticeFermion &in, LatticeFermion &out){assert(0);};
|
||||
virtual void Mooee (const LatticeFermion &in, LatticeFermion &out){assert(0);};
|
||||
virtual void MooeeDag (const LatticeFermion &in, LatticeFermion &out){assert(0);};
|
||||
virtual void MooeeInv (const LatticeFermion &in, LatticeFermion &out){assert(0);};
|
||||
virtual void MooeeInvDag (const LatticeFermion &in, LatticeFermion &out){assert(0);};
|
||||
|
||||
// Implement hopping term non-hermitian hopping term; half cb or both
|
||||
// Implement s-diagonal DW
|
||||
|
@ -3,7 +3,7 @@
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
|
||||
void DiracOpt::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
void DiracOptDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out)
|
||||
{
|
||||
@ -149,7 +149,7 @@ void DiracOpt::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
vstream(out._odata[ss],result*(-0.5));
|
||||
}
|
||||
|
||||
void DiracOpt::DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
void DiracOptDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out)
|
||||
{
|
||||
@ -295,7 +295,7 @@ void DiracOpt::DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
vstream(out._odata[ss],result*(-0.5));
|
||||
}
|
||||
|
||||
void DiracOpt::DhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
void DiracOptDhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp)
|
||||
{
|
||||
|
@ -10,35 +10,40 @@ namespace Grid {
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Generic version works for any Nc and with extra flavour indices
|
||||
class DiracOpt {
|
||||
public:
|
||||
// namespace DiracOpt {
|
||||
|
||||
// These ones will need to be package intelligently. WilsonType base class
|
||||
// for use by DWF etc..
|
||||
static void DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
void DiracOptDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
void DiracOptDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
void DiracOptDhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
static void DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
static void DhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp);
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp);
|
||||
|
||||
// };
|
||||
|
||||
};
|
||||
|
||||
// Hand unrolled for Nc=3, one flavour
|
||||
class DiracOptHand {
|
||||
public:
|
||||
// Hand unrolled for Nc=3, one flavour
|
||||
// namespace DiracOptHand {
|
||||
// These ones will need to be package intelligently. WilsonType base class
|
||||
// for use by DWF etc..
|
||||
static void DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
static void DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
|
||||
};
|
||||
void DiracOptHandDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
void DiracOptHandDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
|
||||
// };
|
||||
|
||||
|
||||
void DiracOptHandDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -280,7 +280,7 @@
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
|
||||
void DiracOptHand::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
void DiracOptHandDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int sF,int sU,const LatticeFermion &in, LatticeFermion &out)
|
||||
{
|
||||
@ -530,7 +530,7 @@ void DiracOptHand::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
}
|
||||
}
|
||||
|
||||
void DiracOptHand::DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
void DiracOptHandDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
|
||||
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
|
||||
int ss,int sU,const LatticeFermion &in, LatticeFermion &out)
|
||||
{
|
||||
|
Reference in New Issue
Block a user