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

Make view specify where and drive data motion - first cut.

This is a compile tiime option --enable-unified=yes/no
This commit is contained in:
Peter Boyle
2020-05-21 16:13:16 -04:00
parent ebb60330c9
commit 7860a50f70
48 changed files with 688 additions and 718 deletions

View File

@@ -264,8 +264,8 @@ private:
{
CloverFieldType T(F.Grid());
T = Zero();
auto T_v = T.View();
auto F_v = F.View();
auto T_v = T.View(CpuWrite);
auto F_v = F.View(CpuRead);
thread_for(i, CloverTerm.Grid()->oSites(),
{
T_v[i]()(0, 1) = timesMinusI(F_v[i]()());
@@ -282,8 +282,8 @@ private:
CloverFieldType T(F.Grid());
T = Zero();
auto T_v = T.View();
auto F_v = F.View();
auto T_v = T.View(CpuWrite);
auto F_v = F.View(CpuRead);
thread_for(i, CloverTerm.Grid()->oSites(),
{
T_v[i]()(0, 1) = -F_v[i]()();
@@ -300,8 +300,8 @@ private:
CloverFieldType T(F.Grid());
T = Zero();
auto T_v = T.View();
auto F_v = F.View();
auto T_v = T.View(CpuWrite);
auto F_v = F.View(CpuRead);
thread_for(i, CloverTerm.Grid()->oSites(),
{
T_v[i]()(0, 0) = timesMinusI(F_v[i]()());
@@ -318,8 +318,8 @@ private:
CloverFieldType T(F.Grid());
T = Zero();
auto T_v = T.View();
auto F_v = F.View();
auto T_v = T.View(CpuWrite);
auto F_v = F.View(CpuRead);
thread_for(i, CloverTerm.Grid()->oSites(),
{
T_v[i]()(0, 1) = timesI(F_v[i]()());
@@ -336,8 +336,8 @@ private:
CloverFieldType T(F.Grid());
T = Zero();
auto T_v = T.View();
auto F_v = F.View();
auto T_v = T.View(CpuWrite);
auto F_v = F.View(CpuRead);
thread_for(i, CloverTerm.Grid()->oSites(),
{
T_v[i]()(0, 1) = -(F_v[i]()());
@@ -355,8 +355,8 @@ private:
T = Zero();
auto T_v = T.View();
auto F_v = F.View();
auto T_v = T.View(CpuWrite);
auto F_v = F.View(CpuRead);
thread_for(i, CloverTerm.Grid()->oSites(),
{
T_v[i]()(0, 0) = timesI(F_v[i]()());