1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 09:45:36 +00:00

Gpu code first version of specialised kernel

This commit is contained in:
paboyle 2018-06-13 20:34:39 +01:00
parent b2a8cd60f5
commit b710fec6ea

View File

@ -70,13 +70,10 @@ public:
#endif #endif
case WilsonKernelsStatic::OptGpu: case WilsonKernelsStatic::OptGpu:
for (int site = 0; site < Nsite; site++) { for (int site = 0; site < Nsite; site++) {
for (int s = 0; s < Ls; s++) { if(interior&&exterior) WilsonKernels<Impl>::GpuDhopSite(st,U,buf,sF,Ls,sU,in,out);
if(interior&&exterior) WilsonKernels<Impl>::GpuDhopSite(st,U,buf,sF,sU,in,out); else if (interior) for (int s = 0; s < Ls; s++) WilsonKernels<Impl>::GenericDhopSiteInt(st,U,buf,sF,sU,in,out);
else if (interior) WilsonKernels<Impl>::GenericDhopSiteInt(st,U,buf,sF,sU,in,out); else if (exterior) for (int s = 0; s < Ls; s++) WilsonKernels<Impl>::GenericDhopSiteExt(st,U,buf,sF,sU,in,out);
else if (exterior) WilsonKernels<Impl>::GenericDhopSiteExt(st,U,buf,sF,sU,in,out); else assert(0);
else assert(0);
sF++;
}
sU++; sU++;
} }
break; break;
@ -241,10 +238,10 @@ public:
private: private:
// Specialised variants // Specialised variants
static accelerator void GpuDhopSite(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf, static accelerator void GpuDhopSite(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
int sF, int sU, const FermionFieldView &in, FermionFieldView &out); int sF, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out);
static accelerator void GpuDhopSiteDag(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf, static accelerator void GpuDhopSiteDag(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
int sF, int sU, const FermionFieldView &in, FermionFieldView &out); int sF, int LLs, int sU, const FermionFieldView &in, FermionFieldView &out);
static accelerator void GenericDhopSite(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf, static accelerator void GenericDhopSite(StencilView &st, DoubledGaugeFieldView &U, SiteHalfSpinor * buf,
int sF, int sU, const FermionFieldView &in, FermionFieldView &out); int sF, int sU, const FermionFieldView &in, FermionFieldView &out);