1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-07-31 03:37:07 +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

@@ -115,9 +115,9 @@ int main (int argc, char** argv)
SU3::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); // Traceless antihermitian momentum; gaussian in lie alg
PokeIndex<LorentzIndex>(mom, mommu, mu);
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);
// fourth order exponential approx
thread_foreach( i, mom_v,{
Uprime_v[i](mu) = U_v[i](mu) + mom_v[i](mu)*U_v[i](mu)*dt + mom_v[i](mu) *mom_v[i](mu) *U_v[i](mu)*(dt*dt/2.0)