1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-20 08:46:55 +01:00

Global edit with change to View usage. autoView() creates a wrapper object that closes the view when scope closes.

This commit is contained in:
Peter Boyle
2020-06-05 18:52:35 -04:00
parent f39c2a240b
commit 1a4c8c3387
78 changed files with 773 additions and 778 deletions

View File

@ -89,8 +89,8 @@ public:
action = (2.0 * Ndim + mass_square) * phisquared - lambda * phisquared * phisquared;
auto p_v = p.View(CpuRead);
auto action_v = action.View(CpuWrite);
autoView( p_v , p, CpuRead);
autoView( action_v , action, CpuWrite);
for (int mu = 0; mu < Ndim; mu++)
{
// pshift = Cshift(p, mu, +1); // not efficient, implement with stencils
@ -146,8 +146,8 @@ public:
for (int point = 0; point < npoint; point++)
{
auto p_v = p.View(CpuRead);
auto force_v = force.View(CpuWrite);
autoView( p_v , p, CpuRead);
autoView( force_v , force, CpuWrite);
int permute_type;
StencilEntry *SE;