View | Details | Raw Unified | Return to bug 268779
Collapse All | Expand All

(-)b/graphics/openpgl/files/patch-openpgl_spatial_KNN.h (+18 lines)
Added Link Here
1
--- openpgl/spatial/KNN.h.orig	2023-01-06 07:38:35 UTC
2
+++ openpgl/spatial/KNN.h
3
@@ -217,7 +217,7 @@ struct KNearestRegionsSearchTree
4
         }
5
         neighbours = (RN*) alignedMalloc(num_points*sizeof(RN), 32);
6
 #if defined(OPENPGL_USE_OMP_THREADING)
7
-        #pragma omp parallel for num_threads(this->m_nCores) schedule(dynamic)
8
+        #pragma omp parallel for schedule(dynamic)
9
         for (size_t n=0; n < num_points; n++)
10
 #else
11
         tbb::parallel_for( tbb::blocked_range<int>(0,num_points), [&](tbb::blocked_range<int> r)
12
@@ -410,4 +410,4 @@ struct KNearestRegionsSearchTree
13
     bool _isBuildNeighbours{false};
14
 };
15
 
16
-}
17
\ No newline at end of file
18
+}
(-)b/graphics/openpgl/files/patch-openpgl_spatial_kdtree_KDTreeBuilder.h (+20 lines)
Added Link Here
1
--- openpgl/spatial/kdtree/KDTreeBuilder.h.orig	2023-01-06 07:33:35 UTC
2
+++ openpgl/spatial/kdtree/KDTreeBuilder.h
3
@@ -250,8 +250,8 @@ struct KDTreePartitionBuilder (private)
4
 
5
 #ifdef OPENPGL_USE_OMP_THREADING
6
     #pragma omp task mergeable
7
-        updateTreeNode(kdTree, kdTree->getNode(nodeIdsLeftRight[0]), depth + 1, sampleRangeLeftRight[0], sampleStatsLeftRight[0], dataStorage, buildSettings);
8
-        updateTreeNode(kdTree, kdTree->getNode(nodeIdsLeftRight[1]), depth + 1, sampleRangeLeftRight[1], sampleStatsLeftRight[1], dataStorage, buildSettings);
9
+        updateTreeNode(kdTree, kdTree->getNode(nodeIdsLeftRight[0]), depth + 1, samples, sampleRangeLeftRight[0], sampleStatsLeftRight[0], dataStorage, buildSettings);
10
+        updateTreeNode(kdTree, kdTree->getNode(nodeIdsLeftRight[1]), depth + 1, samples, sampleRangeLeftRight[1], sampleStatsLeftRight[1], dataStorage, buildSettings);
11
 #else
12
     tbb::parallel_invoke(
13
         [&]{updateTreeNode(kdTree, kdTree->getNode(nodeIdsLeftRight[0]), depth + 1, samples, sampleRangeLeftRight[0], sampleStatsLeftRight[0], dataStorage, buildSettings);},
14
@@ -299,4 +299,4 @@ inline void KDTreePartitionBuilder<TRegion, TContainer
15
         stream.read(reinterpret_cast<char*>(&maxSamples), sizeof(size_t));
16
         stream.read(reinterpret_cast<char*>(&maxDepth), sizeof(size_t));
17
     }
18
-}
19
\ No newline at end of file
20
+}

Return to bug 268779