mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Kernels options
This commit is contained in:
parent
1440565a10
commit
99e2c1e666
@ -30,6 +30,8 @@ directory
|
|||||||
namespace Grid {
|
namespace Grid {
|
||||||
namespace QCD {
|
namespace QCD {
|
||||||
|
|
||||||
|
int StaggeredKernelsStatic::Opt;
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
StaggeredKernels<Impl>::StaggeredKernels(const ImplParams &p) : Base(p){};
|
StaggeredKernels<Impl>::StaggeredKernels(const ImplParams &p) : Base(p){};
|
||||||
|
|
||||||
@ -189,8 +191,17 @@ void StaggeredKernels<Impl>::DhopSiteDag(StencilImpl &st, LebesgueOrder &lo, Dou
|
|||||||
SiteSpinor naive;
|
SiteSpinor naive;
|
||||||
int oneLink =0;
|
int oneLink =0;
|
||||||
int threeLink=1;
|
int threeLink=1;
|
||||||
DhopSiteDepth(st,lo,U,buf,sF,sU,in,naive,oneLink);
|
switch(Opt) {
|
||||||
DhopSiteDepth(st,lo,UUU,buf,sF,sU,in,naik,threeLink);
|
case OptHandUnroll:
|
||||||
|
DhopSiteDepthHand(st,lo,U,buf,sF,sU,in,naive,oneLink);
|
||||||
|
DhopSiteDepthHand(st,lo,UUU,buf,sF,sU,in,naik,threeLink);
|
||||||
|
break;
|
||||||
|
case OptGeneric:
|
||||||
|
default:
|
||||||
|
DhopSiteDepth(st,lo,U,buf,sF,sU,in,naive,oneLink);
|
||||||
|
DhopSiteDepth(st,lo,UUU,buf,sF,sU,in,naik,threeLink);
|
||||||
|
break;
|
||||||
|
}
|
||||||
out._odata[sF] =-naive-naik;
|
out._odata[sF] =-naive-naik;
|
||||||
};
|
};
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
@ -201,8 +212,17 @@ void StaggeredKernels<Impl>::DhopSite(StencilImpl &st, LebesgueOrder &lo, Double
|
|||||||
SiteSpinor naive;
|
SiteSpinor naive;
|
||||||
int oneLink =0;
|
int oneLink =0;
|
||||||
int threeLink=1;
|
int threeLink=1;
|
||||||
DhopSiteDepth(st,lo,U,buf,sF,sU,in,naive,oneLink);
|
switch(Opt) {
|
||||||
DhopSiteDepth(st,lo,UUU,buf,sF,sU,in,naik,threeLink);
|
case OptHandUnroll:
|
||||||
|
DhopSiteDepthHand(st,lo,U,buf,sF,sU,in,naive,oneLink);
|
||||||
|
DhopSiteDepthHand(st,lo,UUU,buf,sF,sU,in,naik,threeLink);
|
||||||
|
break;
|
||||||
|
case OptGeneric:
|
||||||
|
default:
|
||||||
|
DhopSiteDepth(st,lo,U,buf,sF,sU,in,naive,oneLink);
|
||||||
|
DhopSiteDepth(st,lo,UUU,buf,sF,sU,in,naik,threeLink);
|
||||||
|
break;
|
||||||
|
}
|
||||||
out._odata[sF] =naive+naik;
|
out._odata[sF] =naive+naik;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ namespace QCD {
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
class StaggeredKernelsStatic {
|
class StaggeredKernelsStatic {
|
||||||
public:
|
public:
|
||||||
|
enum { OptGeneric, OptHandUnroll, OptInlineAsm };
|
||||||
|
// S-direction is INNERMOST and takes no part in the parity.
|
||||||
|
static int Opt; // these are a temporary hack
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class Impl> class StaggeredKernels : public FermionOperator<Impl> , public StaggeredKernelsStatic {
|
template<class Impl> class StaggeredKernels : public FermionOperator<Impl> , public StaggeredKernelsStatic {
|
||||||
@ -52,6 +55,9 @@ public:
|
|||||||
|
|
||||||
void DhopSiteDepth(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, SiteSpinor * buf,
|
void DhopSiteDepth(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, SiteSpinor * buf,
|
||||||
int sF, int sU, const FermionField &in, SiteSpinor &out,int threeLink);
|
int sF, int sU, const FermionField &in, SiteSpinor &out,int threeLink);
|
||||||
|
|
||||||
|
void DhopSiteDepthHand(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, SiteSpinor * buf,
|
||||||
|
int sF, int sU, const FermionField &in, SiteSpinor &out,int threeLink);
|
||||||
|
|
||||||
void DhopSite(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor * buf,
|
void DhopSite(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor * buf,
|
||||||
int sF, int sU, const FermionField &in, FermionField &out);
|
int sF, int sU, const FermionField &in, FermionField &out);
|
||||||
|
Loading…
Reference in New Issue
Block a user