mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Thread coordinate creation loop
This commit is contained in:
parent
55cdb17691
commit
48008e4d8b
@ -37,19 +37,18 @@ template<class iobj> inline void LatticeCoordinate(Lattice<iobj> &l,int mu)
|
|||||||
GridBase *grid = l.Grid();
|
GridBase *grid = l.Grid();
|
||||||
int Nsimd = grid->iSites();
|
int Nsimd = grid->iSites();
|
||||||
|
|
||||||
Coordinate gcoor;
|
|
||||||
ExtractBuffer<scalar_type> mergebuf(Nsimd);
|
|
||||||
|
|
||||||
vector_type vI;
|
|
||||||
auto l_v = l.View();
|
auto l_v = l.View();
|
||||||
for(int o=0;o<grid->oSites();o++){
|
thread_for( o, grid->oSites(), {
|
||||||
|
vector_type vI;
|
||||||
|
Coordinate gcoor;
|
||||||
|
ExtractBuffer<scalar_type> mergebuf(Nsimd);
|
||||||
for(int i=0;i<grid->iSites();i++){
|
for(int i=0;i<grid->iSites();i++){
|
||||||
grid->RankIndexToGlobalCoor(grid->ThisRank(),o,i,gcoor);
|
grid->RankIndexToGlobalCoor(grid->ThisRank(),o,i,gcoor);
|
||||||
mergebuf[i]=(Integer)gcoor[mu];
|
mergebuf[i]=(Integer)gcoor[mu];
|
||||||
}
|
}
|
||||||
merge<vector_type,scalar_type>(vI,mergebuf);
|
merge<vector_type,scalar_type>(vI,mergebuf);
|
||||||
l_v[o]=vI;
|
l_v[o]=vI;
|
||||||
}
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// LatticeCoordinate();
|
// LatticeCoordinate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user