mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Thread loop changes
This commit is contained in:
parent
b7e6d111d7
commit
f3c89df948
@ -369,7 +369,7 @@ public:
|
|||||||
int words = sizeof(scalar_object) / sizeof(scalar_type);
|
int words = sizeof(scalar_object) / sizeof(scalar_type);
|
||||||
|
|
||||||
auto l_v = l.View();
|
auto l_v = l.View();
|
||||||
thread_loop( (int ss=0;ss<osites;ss++), {
|
thread_for( ss, osites, {
|
||||||
ExtractBuffer<scalar_object> buf(Nsimd);
|
ExtractBuffer<scalar_object> buf(Nsimd);
|
||||||
for (int m = 0; m < multiplicity; m++) { // Draw from same generator multiplicity times
|
for (int m = 0; m < multiplicity; m++) { // Draw from same generator multiplicity times
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ public:
|
|||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
|
|
||||||
// Everybody loops over global volume.
|
// Everybody loops over global volume.
|
||||||
thread_loop( (int gidx=0;gidx<_grid->_gsites;gidx++) , {
|
thread_for( gidx, _grid->_gsites, {
|
||||||
// Where is it?
|
// Where is it?
|
||||||
int rank;
|
int rank;
|
||||||
int o_idx;
|
int o_idx;
|
||||||
@ -461,7 +461,7 @@ public:
|
|||||||
seeders[t] = Reseed(master_engine);
|
seeders[t] = Reseed(master_engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_loop( (int t=0;t<Nthread;t++), {
|
thread_for( t, Nthread, {
|
||||||
// set up one per local site in threaded fashion
|
// set up one per local site in threaded fashion
|
||||||
std::vector<uint32_t> newseeds;
|
std::vector<uint32_t> newseeds;
|
||||||
std::uniform_int_distribution<uint32_t> uid;
|
std::uniform_int_distribution<uint32_t> uid;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user