mirror of
https://github.com/paboyle/Grid.git
synced 2026-10-26 07:33:19 +00: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:
1 parent
ebb60330c9
commit
7860a50f70
48 files changed
+688
-718
No files matched your search
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user