mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Introduce view objects that can safely be copied to GPU for access
This commit is contained in:
@ -86,8 +86,11 @@ int main (int argc, char ** argv)
|
||||
PokeIndex<LorentzIndex>(mom,mommu,mu);
|
||||
|
||||
// fourth order exponential approx
|
||||
thread_loop( (auto i=mom.begin();i<mom.end();i++),{ // exp(pmu dt) * Umu
|
||||
Uprime[i](mu) = U[i](mu) + mom[i](mu)*U[i](mu)*dt ;
|
||||
auto Uprime_v = Uprime.View();
|
||||
auto U_v = U.View();
|
||||
auto mom_v = mom.View();
|
||||
thread_loop( (auto i=mom_v.begin();i<mom_v.end();i++),{ // exp(pmu dt) * Umu
|
||||
Uprime_v[i](mu) = U_v[i](mu) + mom_v[i](mu)*U_v[i](mu)*dt ;
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user