Skip to content

Commit

Permalink
More accurate comment for omp critical sections
Browse files Browse the repository at this point in the history
  • Loading branch information
LSchwiebert committed Jan 5, 2022
1 parent 579e952 commit 0c6bb86
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/moves/MultiParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,8 @@ inline XYZ MultiParticle::CalcRandomTransform(bool &forceInRange, XYZ const &lb,
XYZ randnums;
#ifdef _OPENMP
//Even though we call different random123 functions, they all change c[0]
//so they all need to be in the same critical section (not different names).
//and use the same rng() function, so they all need to be in the same
//critical section (not different names).
#pragma omp critical
#endif
{
Expand Down Expand Up @@ -621,7 +622,8 @@ inline void MultiParticle::RotateRandom(uint molIndex)
XYZ sphereCoords;
#ifdef _OPENMP
//Even though we call different random123 functions, they all change c[0]
//so they all need to be in the same critical section (not different names).
//and use the same rng() function, so they all need to be in the same
//critical section (not different names).
#pragma omp critical
#endif
{
Expand Down Expand Up @@ -656,7 +658,8 @@ inline void MultiParticle::TranslateRandom(uint molIndex)
XYZ shift;
#ifdef _OPENMP
//Even though we call different random123 functions, they all change c[0]
//so they all need to be in the same critical section (not different names).
//and use the same rng() function, so they all need to be in the same
//critical section (not different names).
#pragma omp critical
#endif
{
Expand Down

0 comments on commit 0c6bb86

Please sign in to comment.