1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-18 15:57:05 +01:00

Compiles GPU and CPU, still gives good performance on CPU

This commit is contained in:
Peter Boyle
2019-06-05 13:28:16 +01:00
parent 18d3cde29a
commit 0ee6e77cbc
71 changed files with 1512 additions and 33769 deletions

View File

@ -90,15 +90,7 @@ public:
auto UU = coalescedRead(U(mu));
mult(&phi(), &UU, &chi());
}
#ifdef GPU_VEC
static accelerator_inline void copyLinkGpu(int lane,
SiteDoubledGaugeField & UU,
const SiteDoubledGaugeField &U)
{
auto U_l = extractLane(lane,U);
insertLane(lane,UU,U_l);
}
static accelerator_inline void multLinkGpu(int lane,
typename SiteHalfSpinor::scalar_object &phi,
const SiteDoubledGaugeField &U,
@ -108,17 +100,6 @@ public:
auto U_l = extractLane(lane,U(mu));
phi() = U_l * chi();
}
#else
static accelerator_inline void multLinkGpu(int lane,
SiteHalfSpinor &phi,
const SiteDoubledGaugeField &U,
const SiteHalfSpinor &chi,
int mu)
{
auto U_l = U(mu);
phi() = U_l * chi();
}
#endif
static accelerator_inline void multLinkProp(SitePropagator &phi,
const SiteDoubledGaugeField &U,