mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-18 15:57:05 +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:
@ -99,9 +99,9 @@ int main (int argc, char ** argv)
|
||||
PokeIndex<LorentzIndex>(mom,mommu,mu);
|
||||
|
||||
// fourth order exponential approx
|
||||
auto mom_v = mom.View(CpuRead);
|
||||
auto U_v = U.View(CpuRead);
|
||||
auto Uprime_v = Uprime.View(CpuWrite);
|
||||
autoView( mom_v, mom, CpuRead);
|
||||
autoView( U_v , U, CpuRead);
|
||||
autoView(Uprime_v, Uprime, CpuWrite);
|
||||
|
||||
thread_foreach(i,mom_v,{
|
||||
Uprime_v[i](mu) = U_v[i](mu)
|
||||
|
Reference in New Issue
Block a user