mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Pragma changes and layout and warning elimination for nvcc
This commit is contained in:
parent
063603b1ea
commit
87ee592176
@ -84,7 +84,7 @@ public:
|
|||||||
void push_back(Action<GenField>* ptr) {
|
void push_back(Action<GenField>* ptr) {
|
||||||
// insert only in the correct vector
|
// insert only in the correct vector
|
||||||
std::get< Index < GenField, action_hirep_types>::value >(actions_hirep).push_back(ptr);
|
std::get< Index < GenField, action_hirep_types>::value >(actions_hirep).push_back(ptr);
|
||||||
};
|
}
|
||||||
|
|
||||||
template <class ActPtr>
|
template <class ActPtr>
|
||||||
static void resize(ActPtr ap, unsigned int n) {
|
static void resize(ActPtr ap, unsigned int n) {
|
||||||
|
@ -238,8 +238,6 @@ void CayleyFermion5D<Impl>::MeooeDag5D (const FermionField &psi, FermionField
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
RealD CayleyFermion5D<Impl>::M (const FermionField &psi, FermionField &chi)
|
RealD CayleyFermion5D<Impl>::M (const FermionField &psi, FermionField &chi)
|
||||||
{
|
{
|
||||||
int Ls=this->Ls;
|
|
||||||
|
|
||||||
FermionField Din(psi._grid);
|
FermionField Din(psi._grid);
|
||||||
|
|
||||||
// Assemble Din
|
// Assemble Din
|
||||||
@ -276,8 +274,6 @@ RealD CayleyFermion5D<Impl>::Mdag (const FermionField &psi, FermionField &chi)
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
void CayleyFermion5D<Impl>::Meooe (const FermionField &psi, FermionField &chi)
|
void CayleyFermion5D<Impl>::Meooe (const FermionField &psi, FermionField &chi)
|
||||||
{
|
{
|
||||||
int Ls=this->Ls;
|
|
||||||
|
|
||||||
Meooe5D(psi,this->tmp());
|
Meooe5D(psi,this->tmp());
|
||||||
|
|
||||||
if ( psi.checkerboard == Odd ) {
|
if ( psi.checkerboard == Odd ) {
|
||||||
|
@ -58,14 +58,14 @@ void ContinuedFractionFermion5D<Impl>::SetCoefficientsZolotarev(RealD zolo_hi,Ap
|
|||||||
for(int i=0; i < Ls ; i++){
|
for(int i=0; i < Ls ; i++){
|
||||||
Beta[i] = zdata -> beta[i];
|
Beta[i] = zdata -> beta[i];
|
||||||
cc[i] = 1.0/Beta[i];
|
cc[i] = 1.0/Beta[i];
|
||||||
cc_d[i]=sqrt(cc[i]);
|
cc_d[i]=std::sqrt(cc[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_d[Ls-1]=1.0;
|
cc_d[Ls-1]=1.0;
|
||||||
for(int i=0; i < Ls-1 ; i++){
|
for(int i=0; i < Ls-1 ; i++){
|
||||||
sqrt_cc[i]= sqrt(cc[i]*cc[i+1]);
|
sqrt_cc[i]= std::sqrt(cc[i]*cc[i+1]);
|
||||||
}
|
}
|
||||||
sqrt_cc[Ls-2]=sqrt(cc[Ls-2]);
|
sqrt_cc[Ls-2]=std::sqrt(cc[Ls-2]);
|
||||||
|
|
||||||
|
|
||||||
ZoloHiInv =1.0/zolo_hi;
|
ZoloHiInv =1.0/zolo_hi;
|
||||||
|
@ -89,8 +89,6 @@ void DomainWallEOFAFermion<Impl>::DtildeInv(const FermionField& psi, FermionFiel
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
RealD DomainWallEOFAFermion<Impl>::M(const FermionField& psi, FermionField& chi)
|
RealD DomainWallEOFAFermion<Impl>::M(const FermionField& psi, FermionField& chi)
|
||||||
{
|
{
|
||||||
int Ls = this->Ls;
|
|
||||||
|
|
||||||
FermionField Din(psi._grid);
|
FermionField Din(psi._grid);
|
||||||
|
|
||||||
this->Meooe5D(psi, Din);
|
this->Meooe5D(psi, Din);
|
||||||
@ -103,8 +101,6 @@ RealD DomainWallEOFAFermion<Impl>::M(const FermionField& psi, FermionField& chi)
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
RealD DomainWallEOFAFermion<Impl>::Mdag(const FermionField& psi, FermionField& chi)
|
RealD DomainWallEOFAFermion<Impl>::Mdag(const FermionField& psi, FermionField& chi)
|
||||||
{
|
{
|
||||||
int Ls = this->Ls;
|
|
||||||
|
|
||||||
FermionField Din(psi._grid);
|
FermionField Din(psi._grid);
|
||||||
|
|
||||||
this->DW(psi, Din, DaggerYes);
|
this->DW(psi, Din, DaggerYes);
|
||||||
|
@ -413,7 +413,6 @@ public:
|
|||||||
// Passing through the local coordinate for grid transformation
|
// Passing through the local coordinate for grid transformation
|
||||||
// the force grid is in general very different from the Ls vectorized grid
|
// the force grid is in general very different from the Ls vectorized grid
|
||||||
|
|
||||||
PARALLEL_FOR_LOOP
|
|
||||||
for (int so = 0; so < grid->oSites(); so++) {
|
for (int so = 0; so < grid->oSites(); so++) {
|
||||||
std::vector<typename result_type::scalar_object> vres(Bgrid->Nsimd());
|
std::vector<typename result_type::scalar_object> vres(Bgrid->Nsimd());
|
||||||
std::vector<int> ocoor; grid->oCoorFromOindex(ocoor,so);
|
std::vector<int> ocoor; grid->oCoorFromOindex(ocoor,so);
|
||||||
|
@ -249,10 +249,9 @@ void ImprovedStaggeredFermion<Impl>::DerivInternal(StencilImpl &st, DoubledGauge
|
|||||||
////////////////////////
|
////////////////////////
|
||||||
// Call the single hop
|
// Call the single hop
|
||||||
////////////////////////
|
////////////////////////
|
||||||
PARALLEL_FOR_LOOP
|
thread_loop( (int sss = 0; sss < B._grid->oSites(); sss++), {
|
||||||
for (int sss = 0; sss < B._grid->oSites(); sss++) {
|
Kernels::DhopDirK(st, U, UUU, st.CommBuf(), sss, sss, B, Btilde, mu,1);
|
||||||
Kernels::DhopDir(st, U, UUU, st.CommBuf(), sss, sss, B, Btilde, mu,1);
|
});
|
||||||
}
|
|
||||||
|
|
||||||
// Force in three link terms
|
// Force in three link terms
|
||||||
//
|
//
|
||||||
@ -362,10 +361,9 @@ void ImprovedStaggeredFermion<Impl>::DhopDir(const FermionField &in, FermionFiel
|
|||||||
Compressor compressor;
|
Compressor compressor;
|
||||||
Stencil.HaloExchange(in, compressor);
|
Stencil.HaloExchange(in, compressor);
|
||||||
|
|
||||||
PARALLEL_FOR_LOOP
|
thread_loop( (int sss = 0; sss < in._grid->oSites(); sss++) , {
|
||||||
for (int sss = 0; sss < in._grid->oSites(); sss++) {
|
Kernels::DhopDirK(Stencil, Umu, UUUmu, Stencil.CommBuf(), sss, sss, in, out, dir, disp);
|
||||||
Kernels::DhopDir(Stencil, Umu, UUUmu, Stencil.CommBuf(), sss, sss, in, out, dir, disp);
|
});
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
@ -380,15 +378,13 @@ void ImprovedStaggeredFermion<Impl>::DhopInternal(StencilImpl &st, LebesgueOrder
|
|||||||
st.HaloExchange(in, compressor);
|
st.HaloExchange(in, compressor);
|
||||||
|
|
||||||
if (dag == DaggerYes) {
|
if (dag == DaggerYes) {
|
||||||
PARALLEL_FOR_LOOP
|
thread_loop( (int sss = 0; sss < in._grid->oSites(); sss++), {
|
||||||
for (int sss = 0; sss < in._grid->oSites(); sss++) {
|
|
||||||
Kernels::DhopSiteDag(st, lo, U, UUU, st.CommBuf(), 1, sss, in, out);
|
Kernels::DhopSiteDag(st, lo, U, UUU, st.CommBuf(), 1, sss, in, out);
|
||||||
}
|
});
|
||||||
} else {
|
} else {
|
||||||
PARALLEL_FOR_LOOP
|
thread_loop( (int sss = 0; sss < in._grid->oSites(); sss++), {
|
||||||
for (int sss = 0; sss < in._grid->oSites(); sss++) {
|
|
||||||
Kernels::DhopSite(st, lo, U, UUU, st.CommBuf(), 1, sss, in, out);
|
Kernels::DhopSite(st, lo, U, UUU, st.CommBuf(), 1, sss, in, out);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -108,8 +108,8 @@ ImprovedStaggeredFermion5D<Impl>::ImprovedStaggeredFermion5D(GaugeField &_Uthin,
|
|||||||
assert(FiveDimRedBlackGrid._simd_layout[0]==nsimd);
|
assert(FiveDimRedBlackGrid._simd_layout[0]==nsimd);
|
||||||
|
|
||||||
for(int d=0;d<4;d++){
|
for(int d=0;d<4;d++){
|
||||||
assert(FourDimGrid._simd_layout[d]=1);
|
assert(FourDimGrid._simd_layout[d]==1);
|
||||||
assert(FourDimRedBlackGrid._simd_layout[d]=1);
|
assert(FourDimRedBlackGrid._simd_layout[d]==1);
|
||||||
assert(FiveDimRedBlackGrid._simd_layout[d+1]==1);
|
assert(FiveDimRedBlackGrid._simd_layout[d+1]==1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ void ImprovedStaggeredFermion5D<Impl>::DhopDir(const FermionField &in, FermionFi
|
|||||||
for(int s=0;s<Ls;s++){
|
for(int s=0;s<Ls;s++){
|
||||||
int sU=ss;
|
int sU=ss;
|
||||||
int sF = s+Ls*sU;
|
int sF = s+Ls*sU;
|
||||||
Kernels::DhopDir(Stencil, Umu, UUUmu, Stencil.CommBuf(), sF, sU, in, out, dir, disp);
|
Kernels::DhopDirK(Stencil, Umu, UUUmu, Stencil.CommBuf(), sF, sU, in, out, dir, disp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -167,8 +167,6 @@ void MobiusEOFAFermion<Impl>::DtildeInv(const FermionField& psi, FermionField& c
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
RealD MobiusEOFAFermion<Impl>::M(const FermionField& psi, FermionField& chi)
|
RealD MobiusEOFAFermion<Impl>::M(const FermionField& psi, FermionField& chi)
|
||||||
{
|
{
|
||||||
int Ls = this->Ls;
|
|
||||||
|
|
||||||
FermionField Din(psi._grid);
|
FermionField Din(psi._grid);
|
||||||
|
|
||||||
this->Meooe5D(psi, Din);
|
this->Meooe5D(psi, Din);
|
||||||
@ -181,8 +179,6 @@ RealD MobiusEOFAFermion<Impl>::M(const FermionField& psi, FermionField& chi)
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
RealD MobiusEOFAFermion<Impl>::Mdag(const FermionField& psi, FermionField& chi)
|
RealD MobiusEOFAFermion<Impl>::Mdag(const FermionField& psi, FermionField& chi)
|
||||||
{
|
{
|
||||||
int Ls = this->Ls;
|
|
||||||
|
|
||||||
FermionField Din(psi._grid);
|
FermionField Din(psi._grid);
|
||||||
|
|
||||||
this->DW(psi, Din, DaggerYes);
|
this->DW(psi, Din, DaggerYes);
|
||||||
@ -373,18 +369,18 @@ void MobiusEOFAFermion<Impl>::SetCoefficientsPrecondShiftOps()
|
|||||||
for(int s=0; s<Ls; ++s){
|
for(int s=0; s<Ls; ++s){
|
||||||
|
|
||||||
// MooeeInv_shift_lc
|
// MooeeInv_shift_lc
|
||||||
if(pm == 1){ MooeeInv_shift_lc[s] = std::pow(this->bee[s],s) * std::pow(this->cee[s],Ls-1-s); }
|
if(pm == 1){ MooeeInv_shift_lc[s] = pow(this->bee[s],s) * pow(this->cee[s],Ls-1-s); }
|
||||||
else{ MooeeInv_shift_lc[s] = std::pow(this->bee[s],Ls-1-s) * std::pow(this->cee[s],s); }
|
else { MooeeInv_shift_lc[s] = pow(this->bee[s],Ls-1-s) * pow(this->cee[s],s); }
|
||||||
|
|
||||||
// MooeeInv_shift_norm
|
// MooeeInv_shift_norm
|
||||||
MooeeInv_shift_norm[s] = -MooeeInvDag_shift_lc[s] /
|
MooeeInv_shift_norm[s] = -MooeeInvDag_shift_lc[s] /
|
||||||
( std::pow(this->bee[s],Ls) + mq1*std::pow(this->cee[s],Ls) ) / N;
|
( pow(this->bee[s],Ls) + mq1*pow(this->cee[s],Ls) ) / N;
|
||||||
|
|
||||||
// MooeeInvDag_shift_norm
|
// MooeeInvDag_shift_norm
|
||||||
if(pm == 1){ MooeeInvDag_shift_norm[s] = -std::pow(this->bee[s],s) * std::pow(this->cee[s],Ls-1-s) /
|
if(pm == 1){ MooeeInvDag_shift_norm[s] = -pow(this->bee[s],s) * pow(this->cee[s],(Ls-1-s)) /
|
||||||
( std::pow(this->bee[s],Ls) + mq1*std::pow(this->cee[s],Ls) ) / N; }
|
( pow(this->bee[s],Ls) + mq1*pow(this->cee[s],Ls) ) / N; }
|
||||||
else{ MooeeInvDag_shift_norm[s] = -std::pow(this->bee[s],Ls-1-s) * std::pow(this->cee[s],s) /
|
else{ MooeeInvDag_shift_norm[s] = -pow(this->bee[s],(Ls-1-s)) * pow(this->cee[s],s) /
|
||||||
( std::pow(this->bee[s],Ls) + mq1*std::pow(this->cee[s],Ls) ) / N; }
|
( pow(this->bee[s],Ls) + mq1*pow(this->cee[s],Ls) ) / N; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,6 @@ NAMESPACE_BEGIN(Grid);
|
|||||||
template<class Impl>
|
template<class Impl>
|
||||||
void PartialFractionFermion5D<Impl>::Mdir (const FermionField &psi, FermionField &chi,int dir,int disp){
|
void PartialFractionFermion5D<Impl>::Mdir (const FermionField &psi, FermionField &chi,int dir,int disp){
|
||||||
// this does both dag and undag but is trivial; make a common helper routing
|
// this does both dag and undag but is trivial; make a common helper routing
|
||||||
|
|
||||||
int sign = 1;
|
|
||||||
int Ls = this->Ls;
|
int Ls = this->Ls;
|
||||||
|
|
||||||
this->DhopDir(psi,chi,dir,disp);
|
this->DhopDir(psi,chi,dir,disp);
|
||||||
@ -53,8 +51,6 @@ template<class Impl>
|
|||||||
void PartialFractionFermion5D<Impl>::Meooe_internal(const FermionField &psi, FermionField &chi,int dag)
|
void PartialFractionFermion5D<Impl>::Meooe_internal(const FermionField &psi, FermionField &chi,int dag)
|
||||||
{
|
{
|
||||||
int Ls = this->Ls;
|
int Ls = this->Ls;
|
||||||
int sign = dag ? (-1) : 1;
|
|
||||||
|
|
||||||
if ( psi.checkerboard == Odd ) {
|
if ( psi.checkerboard == Odd ) {
|
||||||
this->DhopEO(psi,chi,DaggerNo);
|
this->DhopEO(psi,chi,DaggerNo);
|
||||||
} else {
|
} else {
|
||||||
|
@ -258,7 +258,7 @@ void StaggeredKernels<Impl>::DhopSite(StencilImpl &st, LebesgueOrder &lo, Double
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
void StaggeredKernels<Impl>::DhopDir( StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor *buf, int sF,
|
void StaggeredKernels<Impl>::DhopDirK( StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor *buf, int sF,
|
||||||
int sU, const FermionField &in, FermionField &out, int dir, int disp)
|
int sU, const FermionField &in, FermionField &out, int dir, int disp)
|
||||||
{
|
{
|
||||||
// Disp should be either +1,-1,+3,-3
|
// Disp should be either +1,-1,+3,-3
|
||||||
|
@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void DhopDir(StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor * buf,
|
void DhopDirK(StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor * buf,
|
||||||
int sF, int sU, const FermionField &in, FermionField &out, int dir,int disp);
|
int sF, int sU, const FermionField &in, FermionField &out, int dir,int disp);
|
||||||
|
|
||||||
void DhopSiteDepth(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, SiteSpinor * buf,
|
void DhopSiteDepth(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, SiteSpinor * buf,
|
||||||
|
@ -97,7 +97,6 @@ void StaggeredKernels<Impl>::DhopSiteHand(StencilImpl &st, LebesgueOrder &lo, Do
|
|||||||
SiteSpinor naive;
|
SiteSpinor naive;
|
||||||
int oneLink =0;
|
int oneLink =0;
|
||||||
int threeLink=1;
|
int threeLink=1;
|
||||||
int skew(0);
|
|
||||||
Real scale(1.0);
|
Real scale(1.0);
|
||||||
|
|
||||||
if(dag) scale = -1.0;
|
if(dag) scale = -1.0;
|
||||||
|
@ -97,7 +97,7 @@ public:
|
|||||||
SiteHalfSpinor *out1,
|
SiteHalfSpinor *out1,
|
||||||
const SiteSpinor *in,
|
const SiteSpinor *in,
|
||||||
Integer j,Integer k, Integer m,Integer type){
|
Integer j,Integer k, Integer m,Integer type){
|
||||||
SiteHalfSpinor temp1, temp2,temp3,temp4;
|
SiteHalfSpinor temp1, temp2;
|
||||||
projector::Proj(temp1,in[k],mu,dag);
|
projector::Proj(temp1,in[k],mu,dag);
|
||||||
projector::Proj(temp2,in[m],mu,dag);
|
projector::Proj(temp2,in[m],mu,dag);
|
||||||
exchange(out0[j],out1[j],temp1,temp2,type);
|
exchange(out0[j],out1[j],temp1,temp2,type);
|
||||||
|
@ -217,7 +217,7 @@ void WilsonFermion<Impl>::DerivInternal(StencilImpl &st, DoubledGaugeField &U,
|
|||||||
// Call the single hop
|
// Call the single hop
|
||||||
////////////////////////
|
////////////////////////
|
||||||
parallel_for (int sss = 0; sss < B._grid->oSites(); sss++) {
|
parallel_for (int sss = 0; sss < B._grid->oSites(); sss++) {
|
||||||
Kernels::DhopDir(st, U, st.CommBuf(), sss, sss, B, Btilde, mu, gamma);
|
Kernels::DhopDirK(st, U, st.CommBuf(), sss, sss, B, Btilde, mu, gamma);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
@ -318,7 +318,7 @@ void WilsonFermion<Impl>::DhopDirDisp(const FermionField &in, FermionField &out,
|
|||||||
Stencil.HaloExchange(in, compressor);
|
Stencil.HaloExchange(in, compressor);
|
||||||
|
|
||||||
parallel_for (int sss = 0; sss < in._grid->oSites(); sss++) {
|
parallel_for (int sss = 0; sss < in._grid->oSites(); sss++) {
|
||||||
Kernels::DhopDir(Stencil, Umu, Stencil.CommBuf(), sss, sss, in, out, dirdisp, gamma);
|
Kernels::DhopDirK(Stencil, Umu, Stencil.CommBuf(), sss, sss, in, out, dirdisp, gamma);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ WilsonFermion5D<Impl>::WilsonFermion5D(GaugeField &_Umu,
|
|||||||
assert(FiveDimRedBlackGrid._simd_layout[0]==nsimd);
|
assert(FiveDimRedBlackGrid._simd_layout[0]==nsimd);
|
||||||
|
|
||||||
for(int d=0;d<4;d++){
|
for(int d=0;d<4;d++){
|
||||||
assert(FourDimGrid._simd_layout[d]=1);
|
assert(FourDimGrid._simd_layout[d]==1);
|
||||||
assert(FourDimRedBlackGrid._simd_layout[d]=1);
|
assert(FourDimRedBlackGrid._simd_layout[d]==1);
|
||||||
assert(FiveDimRedBlackGrid._simd_layout[d+1]==1);
|
assert(FiveDimRedBlackGrid._simd_layout[d+1]==1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ void WilsonFermion5D<Impl>::DhopDir(const FermionField &in, FermionField &out,in
|
|||||||
for(int s=0;s<Ls;s++){
|
for(int s=0;s<Ls;s++){
|
||||||
int sU=ss;
|
int sU=ss;
|
||||||
int sF = s+Ls*sU;
|
int sF = s+Ls*sU;
|
||||||
Kernels::DhopDir(Stencil,Umu,Stencil.CommBuf(),sF,sU,in,out,dirdisp,gamma);
|
Kernels::DhopDirK(Stencil,Umu,Stencil.CommBuf(),sF,sU,in,out,dirdisp,gamma);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -301,7 +301,7 @@ void WilsonFermion5D<Impl>::DerivInternal(StencilImpl & st,
|
|||||||
assert(sF < B._grid->oSites());
|
assert(sF < B._grid->oSites());
|
||||||
assert(sU < U._grid->oSites());
|
assert(sU < U._grid->oSites());
|
||||||
|
|
||||||
Kernels::DhopDir(st, U, st.CommBuf(), sF, sU, B, Btilde, mu, gamma);
|
Kernels::DhopDirK(st, U, st.CommBuf(), sF, sU, B, Btilde, mu, gamma);
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// spin trace outer product
|
// spin trace outer product
|
||||||
@ -312,7 +312,7 @@ void WilsonFermion5D<Impl>::DerivInternal(StencilImpl & st,
|
|||||||
// spin trace outer product
|
// spin trace outer product
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
DerivDhopComputeTime += usecond();
|
DerivDhopComputeTime += usecond();
|
||||||
Impl::InsertForce5D(mat, Btilde, Atilde, mu);
|
this->Impl::InsertForce5D(mat, Btilde, Atilde, mu);
|
||||||
}
|
}
|
||||||
DerivComputeTime += usecond();
|
DerivComputeTime += usecond();
|
||||||
}
|
}
|
||||||
@ -624,7 +624,6 @@ void WilsonFermion5D<Impl>::MomentumSpacePropagatorHt(FermionField &out,const Fe
|
|||||||
for(int idx=0;idx<_grid->lSites();idx++){
|
for(int idx=0;idx<_grid->lSites();idx++){
|
||||||
std::vector<int> lcoor(Nd);
|
std::vector<int> lcoor(Nd);
|
||||||
Tcomplex cc;
|
Tcomplex cc;
|
||||||
RealD sgn;
|
|
||||||
_grid->LocalIndexToLocalCoor(idx,lcoor);
|
_grid->LocalIndexToLocalCoor(idx,lcoor);
|
||||||
peekLocalSite(cc,cosha,lcoor);
|
peekLocalSite(cc,cosha,lcoor);
|
||||||
assert((double)real(cc)>=1.0);
|
assert((double)real(cc)>=1.0);
|
||||||
|
@ -208,8 +208,8 @@ void WilsonKernels<Impl>::GenericDhopSiteDagExt(StencilImpl &st, LebesgueOrder &
|
|||||||
SiteHalfSpinor *buf, int sF,
|
SiteHalfSpinor *buf, int sF,
|
||||||
int sU, const FermionField &in, FermionField &out)
|
int sU, const FermionField &in, FermionField &out)
|
||||||
{
|
{
|
||||||
SiteHalfSpinor tmp;
|
// SiteHalfSpinor tmp;
|
||||||
SiteHalfSpinor chi;
|
// SiteHalfSpinor chi;
|
||||||
SiteHalfSpinor *chi_p;
|
SiteHalfSpinor *chi_p;
|
||||||
SiteHalfSpinor Uchi;
|
SiteHalfSpinor Uchi;
|
||||||
SiteSpinor result;
|
SiteSpinor result;
|
||||||
@ -235,8 +235,8 @@ void WilsonKernels<Impl>::GenericDhopSiteExt(StencilImpl &st, LebesgueOrder &lo,
|
|||||||
SiteHalfSpinor *buf, int sF,
|
SiteHalfSpinor *buf, int sF,
|
||||||
int sU, const FermionField &in, FermionField &out)
|
int sU, const FermionField &in, FermionField &out)
|
||||||
{
|
{
|
||||||
SiteHalfSpinor tmp;
|
// SiteHalfSpinor tmp;
|
||||||
SiteHalfSpinor chi;
|
// SiteHalfSpinor chi;
|
||||||
SiteHalfSpinor *chi_p;
|
SiteHalfSpinor *chi_p;
|
||||||
SiteHalfSpinor Uchi;
|
SiteHalfSpinor Uchi;
|
||||||
SiteSpinor result;
|
SiteSpinor result;
|
||||||
@ -258,7 +258,7 @@ void WilsonKernels<Impl>::GenericDhopSiteExt(StencilImpl &st, LebesgueOrder &lo,
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
void WilsonKernels<Impl>::DhopDir( StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor *buf, int sF,
|
void WilsonKernels<Impl>::DhopDirK( StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor *buf, int sF,
|
||||||
int sU, const FermionField &in, FermionField &out, int dir, int gamma) {
|
int sU, const FermionField &in, FermionField &out, int dir, int gamma) {
|
||||||
|
|
||||||
SiteHalfSpinor tmp;
|
SiteHalfSpinor tmp;
|
||||||
|
@ -176,7 +176,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DhopDir(StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor * buf,
|
void DhopDirK(StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor * buf,
|
||||||
int sF, int sU, const FermionField &in, FermionField &out, int dirdisp, int gamma);
|
int sF, int sU, const FermionField &in, FermionField &out, int dirdisp, int gamma);
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -468,8 +468,7 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
#define HAND_STENCIL_LEG_EXT(PROJ,PERM,DIR,RECON,F,LOAD_CHI_IMPL,LOAD_CHIMU_IMPL,MULT_2SPIN_IMPL) \
|
#define HAND_STENCIL_LEG_EXT(PROJ,PERM,DIR,RECON,F,LOAD_CHI_IMPL,LOAD_CHIMU_IMPL,MULT_2SPIN_IMPL) \
|
||||||
SE=st.GetEntry(ptype,DIR,ss); \
|
SE=st.GetEntry(ptype,DIR,ss); \
|
||||||
offset = SE->_offset; \
|
offset = SE->_offset; \
|
||||||
local = SE->_is_local; \
|
perm = SE->_permute; \
|
||||||
perm = SE->_permute; \
|
|
||||||
if((!SE->_is_local)&&(!st.same_node[DIR]) ) { \
|
if((!SE->_is_local)&&(!st.same_node[DIR]) ) { \
|
||||||
LOAD_CHI_IMPL(DIR,F,PERM); \
|
LOAD_CHI_IMPL(DIR,F,PERM); \
|
||||||
MULT_2SPIN_IMPL(DIR,F); \
|
MULT_2SPIN_IMPL(DIR,F); \
|
||||||
@ -691,7 +690,7 @@ WilsonKernels<Impl>::HandDhopSiteExt(StencilImpl &st,LebesgueOrder &lo,DoubledGa
|
|||||||
|
|
||||||
HAND_DECLARATIONS(ignore);
|
HAND_DECLARATIONS(ignore);
|
||||||
|
|
||||||
int offset,local,perm, ptype;
|
int offset, perm, ptype;
|
||||||
StencilEntry *SE;
|
StencilEntry *SE;
|
||||||
int nmu=0;
|
int nmu=0;
|
||||||
|
|
||||||
@ -708,6 +707,7 @@ WilsonKernels<Impl>::HandDhopSiteExt(StencilImpl &st,LebesgueOrder &lo,DoubledGa
|
|||||||
HAND_RESULT_EXT(ss,F)
|
HAND_RESULT_EXT(ss,F)
|
||||||
|
|
||||||
HAND_DOP_SITE_EXT(, LOAD_CHI,LOAD_CHIMU,MULT_2SPIN);
|
HAND_DOP_SITE_EXT(, LOAD_CHI,LOAD_CHIMU,MULT_2SPIN);
|
||||||
|
perm++;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Impl>
|
template<class Impl>
|
||||||
@ -720,7 +720,7 @@ void WilsonKernels<Impl>::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D
|
|||||||
HAND_DECLARATIONS(ignore);
|
HAND_DECLARATIONS(ignore);
|
||||||
|
|
||||||
StencilEntry *SE;
|
StencilEntry *SE;
|
||||||
int offset,local,perm, ptype;
|
int offset, perm, ptype;
|
||||||
int nmu=0;
|
int nmu=0;
|
||||||
|
|
||||||
#define HAND_DOP_SITE_DAG_EXT(F,LOAD_CHI_IMPL,LOAD_CHIMU_IMPL,MULT_2SPIN_IMPL) \
|
#define HAND_DOP_SITE_DAG_EXT(F,LOAD_CHI_IMPL,LOAD_CHIMU_IMPL,MULT_2SPIN_IMPL) \
|
||||||
@ -736,6 +736,7 @@ void WilsonKernels<Impl>::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D
|
|||||||
HAND_RESULT_EXT(ss,F)
|
HAND_RESULT_EXT(ss,F)
|
||||||
|
|
||||||
HAND_DOP_SITE_DAG_EXT(, LOAD_CHI,LOAD_CHIMU,MULT_2SPIN);
|
HAND_DOP_SITE_DAG_EXT(, LOAD_CHI,LOAD_CHIMU,MULT_2SPIN);
|
||||||
|
perm++;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
@ -868,7 +869,7 @@ void WilsonKernels<Impl>::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D
|
|||||||
\
|
\
|
||||||
HAND_DECLARATIONS(ignore); \
|
HAND_DECLARATIONS(ignore); \
|
||||||
\
|
\
|
||||||
int offset,local,perm, ptype, g, direction, distance, sl, inplace_twist; \
|
int offset,perm, ptype, g, direction, distance, sl, inplace_twist; \
|
||||||
StencilEntry *SE; \
|
StencilEntry *SE; \
|
||||||
int nmu=0; \
|
int nmu=0; \
|
||||||
HAND_DOP_SITE_EXT(0, LOAD_CHI_GPARITY,LOAD_CHIMU_GPARITY,MULT_2SPIN_GPARITY); \
|
HAND_DOP_SITE_EXT(0, LOAD_CHI_GPARITY,LOAD_CHIMU_GPARITY,MULT_2SPIN_GPARITY); \
|
||||||
@ -886,7 +887,7 @@ void WilsonKernels<Impl>::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D
|
|||||||
HAND_DECLARATIONS(ignore); \
|
HAND_DECLARATIONS(ignore); \
|
||||||
\
|
\
|
||||||
StencilEntry *SE; \
|
StencilEntry *SE; \
|
||||||
int offset,local,perm, ptype, g, direction, distance, sl, inplace_twist; \
|
int offset,perm, ptype, g, direction, distance, sl, inplace_twist; \
|
||||||
int nmu=0; \
|
int nmu=0; \
|
||||||
HAND_DOP_SITE_DAG_EXT(0, LOAD_CHI_GPARITY,LOAD_CHIMU_GPARITY,MULT_2SPIN_GPARITY); \
|
HAND_DOP_SITE_DAG_EXT(0, LOAD_CHI_GPARITY,LOAD_CHIMU_GPARITY,MULT_2SPIN_GPARITY); \
|
||||||
nmu = 0; \
|
nmu = 0; \
|
||||||
|
@ -75,7 +75,7 @@ template<class Impl>
|
|||||||
void WilsonTMFermion<Impl>::MooeeInv(const FermionField &in, FermionField &out) {
|
void WilsonTMFermion<Impl>::MooeeInv(const FermionField &in, FermionField &out) {
|
||||||
RealD m = this->mass;
|
RealD m = this->mass;
|
||||||
RealD tm = this->mu;
|
RealD tm = this->mu;
|
||||||
RealD mtil = 4.0+this->mass;
|
RealD mtil = 4.0+m;
|
||||||
RealD sq = mtil*mtil+tm*tm;
|
RealD sq = mtil*mtil+tm*tm;
|
||||||
RealD a = mtil/sq;
|
RealD a = mtil/sq;
|
||||||
RealD b = -tm /sq;
|
RealD b = -tm /sq;
|
||||||
@ -85,7 +85,7 @@ template<class Impl>
|
|||||||
void WilsonTMFermion<Impl>::MooeeInvDag(const FermionField &in, FermionField &out) {
|
void WilsonTMFermion<Impl>::MooeeInvDag(const FermionField &in, FermionField &out) {
|
||||||
RealD m = this->mass;
|
RealD m = this->mass;
|
||||||
RealD tm = this->mu;
|
RealD tm = this->mu;
|
||||||
RealD mtil = 4.0+this->mass;
|
RealD mtil = 4.0+m;
|
||||||
RealD sq = mtil*mtil+tm*tm;
|
RealD sq = mtil*mtil+tm*tm;
|
||||||
RealD a = mtil/sq;
|
RealD a = mtil/sq;
|
||||||
RealD b = tm /sq;
|
RealD b = tm /sq;
|
||||||
|
@ -57,8 +57,7 @@ public:
|
|||||||
FourDimRedBlackGrid,_mass,_M5,p)
|
FourDimRedBlackGrid,_mass,_M5,p)
|
||||||
|
|
||||||
{
|
{
|
||||||
RealD eps = 1.0;
|
// RealD eps = 1.0;
|
||||||
|
|
||||||
std::cout<<GridLogMessage << "ZMobiusFermion (b="<<b<<",c="<<c<<") with Ls= "<<this->Ls<<" gamma passed in"<<std::endl;
|
std::cout<<GridLogMessage << "ZMobiusFermion (b="<<b<<",c="<<c<<") with Ls= "<<this->Ls<<" gamma passed in"<<std::endl;
|
||||||
std::vector<Coeff_t> zgamma(this->Ls);
|
std::vector<Coeff_t> zgamma(this->Ls);
|
||||||
for(int s=0;s<this->Ls;s++){
|
for(int s=0;s<this->Ls;s++){
|
||||||
|
@ -76,11 +76,10 @@ public:
|
|||||||
// Move this elsewhere? FIXME
|
// Move this elsewhere? FIXME
|
||||||
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
|
||||||
PARALLEL_FOR_LOOP
|
thread_loop ( (auto ss = 0; ss < U._grid->oSites(); ss++),{
|
||||||
for (auto ss = 0; ss < U._grid->oSites(); ss++) {
|
|
||||||
U._odata[ss]._internal[mu] =
|
U._odata[ss]._internal[mu] =
|
||||||
U._odata[ss]._internal[mu] + W._odata[ss]._internal;
|
U._odata[ss]._internal[mu] + W._odata[ss]._internal;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Support needed for the assembly of loops including all boundary condition
|
// Support needed for the assembly of loops including all boundary condition
|
||||||
// effects such as conjugate bcs
|
// effects such as Conjugate bcs
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
template <class covariant>
|
template <class covariant>
|
||||||
|
@ -73,14 +73,14 @@ namespace ConjugateBC {
|
|||||||
// U U^* U^* U^T U^adj = U (U U U^dag U^T )^*
|
// U U^* U^* U^T U^adj = U (U U U^dag U^T )^*
|
||||||
// = U (U U U^dag)^* ( U^T )^*
|
// = U (U U U^dag)^* ( U^T )^*
|
||||||
//
|
//
|
||||||
// So covariant shift rule: conjugate inward shifted plane when crossing boundary applies.
|
// So covariant shift rule: Conjugate inward shifted plane when crossing boundary applies.
|
||||||
//
|
//
|
||||||
// This conjugate should be applied to BOTH the link and the covariant field on backward shift
|
// This Conjugate should be applied to BOTH the link and the covariant field on backward shift
|
||||||
// boundary wrap.
|
// boundary wrap.
|
||||||
//
|
//
|
||||||
// | |
|
// | |
|
||||||
// xxxxxxxxxxxxxxxxx
|
// xxxxxxxxxxxxxxxxx
|
||||||
// | | <---- this link is conjugated, and the path leading into it. Segment crossing in and out is double conjugated.
|
// | | <---- this link is Conjugated, and the path leading into it. Segment crossing in and out is double Conjugated.
|
||||||
// --
|
// --
|
||||||
// ------->
|
// ------->
|
||||||
template<class covariant,class gauge> Lattice<covariant> CovShiftForward(const Lattice<gauge> &Link,
|
template<class covariant,class gauge> Lattice<covariant> CovShiftForward(const Lattice<gauge> &Link,
|
||||||
|
@ -279,8 +279,6 @@ public:
|
|||||||
int su2_subgroup, int nheatbath, LatticeInteger &wheremask) {
|
int su2_subgroup, int nheatbath, LatticeInteger &wheremask) {
|
||||||
GridBase *grid = link._grid;
|
GridBase *grid = link._grid;
|
||||||
|
|
||||||
int ntrials = 0;
|
|
||||||
int nfails = 0;
|
|
||||||
const RealD twopi = 2.0 * M_PI;
|
const RealD twopi = 2.0 * M_PI;
|
||||||
|
|
||||||
LatticeMatrix staple(grid);
|
LatticeMatrix staple(grid);
|
||||||
|
Loading…
Reference in New Issue
Block a user