#14596 Remove unnecessary critical section in RiaCurveMerger

Each iteration writes to its own element of accumulatedValidValues, which is sized before the loop, so no synchronization is required. The write to curveValues a few lines below uses the same pattern without a critical section.

All unnamed critical regions share a single process wide lock, so this also removes contention against unrelated parallel loops.
This commit is contained in:
Magne Sjaastad
2026-08-25 08:22:29 +02:00
parent ad0f5f1bce
commit 5c325dcc0b
@@ -195,7 +195,7 @@ void RiaCurveMerger<XValueType>::computeInterpolatedValues( bool includeValuesFr
if ( !RiaCurveDataTools::isValidValue( interpolValue, false ) )
{
#pragma omp critical
// Each iteration writes to its own element, so no synchronization is required
accumulatedValidValues[valueIndex] = HUGE_VAL;
}