mirror of
https://github.com/paboyle/Grid.git
synced 2026-10-03 22:48:05 +01:00
Single SIMD lane operations for CUDA
This commit is contained in:
1 parent
efa84ca50a
commit
38e2a32ac9
1 file changed
+20
@@ -215,6 +215,16 @@ public:
|
|||||||
mult(&phi(), &U(mu), &chi());
|
mult(&phi(), &U(mu), &chi());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static accelerator_inline void multLinkGpu(int lane,
|
||||||
|
typename SiteHalfSpinor::scalar_object &phi,
|
||||||
|
const SiteDoubledGaugeField &U,
|
||||||
|
const typename SiteHalfSpinor::scalar_object &chi,
|
||||||
|
int mu)
|
||||||
|
{
|
||||||
|
auto U_l = extractLaneGpu(lane,U(mu));
|
||||||
|
phi() = U_l * chi();
|
||||||
|
}
|
||||||
|
|
||||||
static accelerator_inline void multLinkProp(SitePropagator &phi,
|
static accelerator_inline void multLinkProp(SitePropagator &phi,
|
||||||
const SiteDoubledGaugeField &U,
|
const SiteDoubledGaugeField &U,
|
||||||
const SitePropagator &chi,
|
const SitePropagator &chi,
|
||||||
@@ -355,6 +365,16 @@ public:
|
|||||||
mult(&phi(), &UU(), &chi());
|
mult(&phi(), &UU(), &chi());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static accelerator_inline void multLinkGpu(int lane,
|
||||||
|
typename SiteHalfSpinor::scalar_object &phi,
|
||||||
|
const SiteDoubledGaugeField &U,
|
||||||
|
const typename SiteHalfSpinor::scalar_object &chi,
|
||||||
|
int mu)
|
||||||
|
{
|
||||||
|
auto U_l = U(mu);
|
||||||
|
phi() = U_l * chi();
|
||||||
|
}
|
||||||
|
|
||||||
static accelerator_inline void multLinkProp(SitePropagator &phi,
|
static accelerator_inline void multLinkProp(SitePropagator &phi,
|
||||||
const SiteDoubledGaugeField &U,
|
const SiteDoubledGaugeField &U,
|
||||||
const SitePropagator &chi,int mu)
|
const SitePropagator &chi,int mu)
|
||||||
|
|||||||
Reference in new issue
Block a user