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:
@ -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;
|
||||
|
Reference in New Issue
Block a user