mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Performance : Move construction of AABB tree out of parallel loop
Crash seen for regression test TestCase_Surfaces
This commit is contained in:
parent
b20747efbe
commit
04311c64c6
@ -157,6 +157,12 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
|
|||||||
m_triVxToCellCornerWeights.reserve( nativeTriangleIndices.size() * 24 );
|
m_triVxToCellCornerWeights.reserve( nativeTriangleIndices.size() * 24 );
|
||||||
outputTriangleVertices.reserve( nativeTriangleIndices.size() * 24 );
|
outputTriangleVertices.reserve( nativeTriangleIndices.size() * 24 );
|
||||||
|
|
||||||
|
// Ensure AABB search tree is constructed outside parallel loop
|
||||||
|
{
|
||||||
|
std::vector<size_t> triIntersectedCellCandidates;
|
||||||
|
m_hexGrid->findIntersectingCells( cvf::BoundingBox(), &triIntersectedCellCandidates );
|
||||||
|
}
|
||||||
|
|
||||||
#pragma omp parallel num_threads( 6 ) // More threads have nearly no effect
|
#pragma omp parallel num_threads( 6 ) // More threads have nearly no effect
|
||||||
{
|
{
|
||||||
// Loop local memory allocation.
|
// Loop local memory allocation.
|
||||||
|
Loading…
Reference in New Issue
Block a user