1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +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; half.Checkerboard() = cb;
autoView( half_v, half, CpuWrite); autoView( half_v, half, AcceleratorWrite);
autoView( full_v, full, CpuRead); autoView( full_v, full, AcceleratorRead);
thread_for(ss, full.Grid()->oSites(),{ accelerator_for(ss, full.Grid()->oSites(),full.Grid()->Nsimd(),{
int cbos; int cbos;
Coordinate coor; Coordinate coor;
full.Grid()->oCoorFromOindex(coor,ss); 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) template<class vobj> inline void setCheckerboard(Lattice<vobj> &full,const Lattice<vobj> &half)
{ {
int cb = half.Checkerboard(); int cb = half.Checkerboard();
autoView( half_v , half, CpuRead); autoView( half_v , half, AcceleratorRead);
autoView( full_v , full, CpuWrite); autoView( full_v , full, AcceleratorWrite);
thread_for(ss,full.Grid()->oSites(),{ accelerator_for(ss, full.Grid()->oSites(),full.Grid()->Nsimd(),{
Coordinate coor; Coordinate coor;
int cbos; int cbos;