1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-14 01:35:36 +00:00

Threading improvement

This commit is contained in:
paboyle 2017-12-05 14:12:22 +00:00
parent 3729c7a7a6
commit 9579c9c327

View File

@ -385,13 +385,14 @@ namespace Grid {
// MT implementation does not implement fast discard even though // MT implementation does not implement fast discard even though
// in principle this is possible // in principle this is possible
//////////////////////////////////////////////// ////////////////////////////////////////////////
std::vector<int> gcoor;
int rank,o_idx,i_idx;
// Everybody loops over global volume. // Everybody loops over global volume.
parallel_for(int gidx=0;gidx<_grid->_gsites;gidx++){ parallel_for(int gidx=0;gidx<_grid->_gsites;gidx++){
// Where is it? // Where is it?
int rank,o_idx,i_idx;
std::vector<int> gcoor;
_grid->GlobalIndexToGlobalCoor(gidx,gcoor); _grid->GlobalIndexToGlobalCoor(gidx,gcoor);
_grid->GlobalCoorToRankIndex(rank,o_idx,i_idx,gcoor); _grid->GlobalCoorToRankIndex(rank,o_idx,i_idx,gcoor);