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 committed 2020-05-21 16:13:16 -04:00
1 parent ebb60330c9
commit 7860a50f70
48 files changed
+688 -718

No files matched your search

+4 -4
View File
@@ -86,8 +86,8 @@ public:
// Move this elsewhere? FIXME
static inline void AddLink(Field &U, LinkField &W, int mu) { // U[mu] += W
auto U_v = U.View();
auto W_v = W.View();
auto U_v = U.View(CpuWrite);
auto W_v = W.View(CpuRead);
thread_for( ss, U.Grid()->oSites(), {
U_v[ss](mu) = U_v[ss](mu) + W_v[ss]();
});
@@ -131,8 +131,8 @@ public:
//static std::chrono::duration<double> diff;
//auto start = std::chrono::high_resolution_clock::now();
auto U_v = U.View();
auto P_v = P.View();
auto U_v = U.View(CpuWrite);
auto P_v = P.View(CpuRead);
thread_for(ss, P.Grid()->oSites(),{
for (int mu = 0; mu < Nd; mu++) {
U_v[ss](mu) = ProjectOnGroup(Exponentiate(P_v[ss](mu), ep, Nexp) * U_v[ss](mu));