mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-16 14:57:05 +01:00
parallel_for elimination -> thread_loop
This commit is contained in:
@ -485,7 +485,7 @@ int main (int argc, char ** argv)
|
||||
dbytes=0;
|
||||
ncomm=0;
|
||||
|
||||
parallel_for(int dir=0;dir<8;dir++){
|
||||
thread_loop( (int dir=0;dir<8;dir++),{
|
||||
|
||||
double tbytes;
|
||||
int mu =dir % 4;
|
||||
@ -506,10 +506,9 @@ int main (int argc, char ** argv)
|
||||
tbytes= Grid.StencilSendToRecvFrom((void *)&xbuf[dir][0], xmit_to_rank,
|
||||
(void *)&rbuf[dir][0], recv_from_rank, bytes,dir);
|
||||
|
||||
#pragma omp atomic
|
||||
dbytes+=tbytes;
|
||||
thread_critical { dbytes+=tbytes; }
|
||||
}
|
||||
}
|
||||
});
|
||||
Grid.Barrier();
|
||||
double stop=usecond();
|
||||
t_time[i] = stop-start; // microseconds
|
||||
|
Reference in New Issue
Block a user