4 ms·
IIRC it should be possible to guard the increments with an "omp atomic" pragma rather than an "omp critical", which may well provide better performance. It's po
by archangel_one 15y ago
IIRC it should be possible to guard the increments with an "omp atomic" pragma rather than an "omp critical", which may well provide better performance. It's possible that the compiler is able to replace the critical section with an atomic increment where appropriate, but equally possible that it doesn't.