1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-17 07:17:06 +01:00

View location & access mode

This commit is contained in:
Peter Boyle
2020-05-21 16:13:59 -04:00
parent 7860a50f70
commit a7abda89e2
8 changed files with 47 additions and 47 deletions

View File

@ -252,9 +252,9 @@ public:
double start=usecond();
for(int i=0;i<Nloop;i++){
z=a*x-y;
auto x_v = x.View();
auto y_v = y.View();
auto z_v = z.View();
auto x_v = x.View(CpuWrite);
auto y_v = y.View(CpuWrite);
auto z_v = z.View(CpuRead);
x_v[0]=z_v[0]; // force serial dependency to prevent optimise away
y_v[4]=z_v[4];
}
@ -534,8 +534,8 @@ public:
{
LatticeGaugeField Umu5d(FGrid);
std::vector<LatticeColourMatrix> U(4,FGrid);
auto Umu_v = Umu.View();
auto Umu5d_v = Umu5d.View();
auto Umu_v = Umu.View(CpuRead);
auto Umu5d_v = Umu5d.View(CpuWrite);
for(int ss=0;ss<Umu.Grid()->oSites();ss++){
for(int s=0;s<Ls;s++){
Umu5d_v[Ls*ss+s] = Umu_v[ss];