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