1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Changed pick- and setCheckerboard to use accelerator_for

This commit is contained in:
Henrique B. R. 2021-04-01 18:21:19 +01:00
parent 3fe75bc7cb
commit 92e2c517d8

View File

@ -51,9 +51,9 @@ template<class vobj> inline void pickCheckerboard(int cb,Lattice<vobj> &half,con
{
half.Checkerboard() = cb;
autoView( half_v, half, CpuWrite);
autoView( full_v, full, CpuRead);
thread_for(ss, full.Grid()->oSites(),{
autoView( half_v, half, AcceleratorWrite);
autoView( full_v, full, AcceleratorRead);
accelerator_for(ss, full.Grid()->oSites(),full.Grid()->Nsimd(),{
int cbos;
Coordinate coor;
full.Grid()->oCoorFromOindex(coor,ss);
@ -68,9 +68,9 @@ template<class vobj> inline void pickCheckerboard(int cb,Lattice<vobj> &half,con
template<class vobj> inline void setCheckerboard(Lattice<vobj> &full,const Lattice<vobj> &half)
{
int cb = half.Checkerboard();
autoView( half_v , half, CpuRead);
autoView( full_v , full, CpuWrite);
thread_for(ss,full.Grid()->oSites(),{
autoView( half_v , half, AcceleratorRead);
autoView( full_v , full, AcceleratorWrite);
accelerator_for(ss, full.Grid()->oSites(),full.Grid()->Nsimd(),{
Coordinate coor;
int cbos;