OpenMP: Use default AABB tree construction for one cell per BB

Do not use buildCellSearchTreeOptimized() when when cellCountPerBB is 1, as the performance in this case is best using buildCellSearchTree()
This commit is contained in:
Magne Sjaastad committed 2022-12-20 13:39:29 +01:00
1 parent 8f33caef74
commit de29b3b0ed
1 file changed
+8 -1
@@ -272,7 +272,14 @@ void RigMainGrid::computeCachedData( std::string* aabbTreeInfo )
const double factor = std::ceil( cellCount() / maxNumberOfLeafNodes );
const size_t cellsPerBoundingBox = std::max( size_t( 1 ), static_cast<size_t>( factor ) );
buildCellSearchTreeOptimized( cellsPerBoundingBox );
if ( cellsPerBoundingBox > 1 )
{
buildCellSearchTreeOptimized( cellsPerBoundingBox );
}
else
{
buildCellSearchTree();
}
if ( aabbTreeInfo )
{