mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Fix for GPU conserveed current
This commit is contained in:
parent
97a59643f7
commit
ff1fa98808
@ -106,11 +106,15 @@ public:
|
|||||||
const _SpinorField & phi,
|
const _SpinorField & phi,
|
||||||
int mu)
|
int mu)
|
||||||
{
|
{
|
||||||
|
const int Nsimd = SiteHalfSpinor::Nsimd();
|
||||||
autoView( out_v, out, AcceleratorWrite);
|
autoView( out_v, out, AcceleratorWrite);
|
||||||
autoView( phi_v, phi, AcceleratorRead);
|
autoView( phi_v, phi, AcceleratorRead);
|
||||||
autoView( Umu_v, Umu, AcceleratorRead);
|
autoView( Umu_v, Umu, AcceleratorRead);
|
||||||
accelerator_for(sss,out.Grid()->oSites(),1,{
|
typedef decltype(coalescedRead(out_v[0])) calcSpinor;
|
||||||
multLink(out_v[sss],Umu_v[sss],phi_v[sss],mu);
|
accelerator_for(sss,out.Grid()->oSites(),Nsimd,{
|
||||||
|
calcSpinor tmp;
|
||||||
|
multLink(tmp,Umu_v[sss],phi_v(sss),mu);
|
||||||
|
coalescedWrite(out_v[sss],tmp);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user