1
0
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:
paboyle
2018-03-04 16:40:11 +00:00
parent aead94e9a7
commit 984e06e2b5
20 changed files with 204 additions and 142 deletions

View File

@ -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 ;
});
}