Commit 8fb10eac20e8aaecb5b776f21b2fecfe20e33287

Authored by Josh Cardenzana
1 parent 47280215

Add critical section for incrementing ctbin counts cube (#1970)

Added critical region when incrementing the bins of the counts cube. This didn't impact the computation time, but may improve the reliability of filling the cube if the same bin is being filled by two different observations.
Showing 1 changed file with 2 additions and 0 deletions
src/ctbin/ctbin.cpp
... ... @@ -545,7 +545,9 @@ void ctbin::fill_cube(GCTAObservation* obs)
545 545 }
546 546  
547 547 // Fill event in skymap
  548 + #pragma omp critical
548 549 m_counts(pixel, iebin) += 1.0;
  550 +
549 551 num_in_map++;
550 552  
551 553 } // endfor: looped over all events
... ...