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

View locatoin and access mode

This commit is contained in:
Peter Boyle
2020-05-21 16:14:20 -04:00
parent a7abda89e2
commit f999408e92
22 changed files with 76 additions and 77 deletions

View File

@@ -107,8 +107,8 @@ int main(int argc, char ** argv)
// Implement a stencil code that should agree with cshift!
for(int i=0;i<Check.Grid()->oSites();i++){
auto SE = gStencil.GetEntry(0,i);
auto check = Check.View();
auto foo = Foo.View();
auto check = Check.View(CpuWrite);
auto foo = Foo.View(CpuRead);
// Encapsulate in a general wrapper
check[i] = foo[SE->_offset]; auto tmp=check[i];
@@ -147,8 +147,8 @@ int main(int argc, char ** argv)
}}}}
if (nrm > 1.0e-4) {
auto check = Check.View();
auto bar = Bar.View();
auto check = Check.View(CpuRead);
auto bar = Bar.View(CpuRead);
for(int i=0;i<check.size();i++){
std::cout << i<<" Check "<<check[i]<< "\n"<<i<<" Bar "<<bar[i]<<std::endl;
}