Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-07-28 14:41:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-28 14:45:36 +0400
commit93d0a2c2244637cbd02381241e4ea075106b0044 (patch)
treece3d58044fded0650913a87c063f071c8c7d8c14 /source/blender/blenlib/intern
parentbaa58c7db477cf58d8091d0ec4977932d3edfc02 (diff)
Warnings
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 7b7463ca8b3..17ab55e58f4 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -48,10 +48,12 @@
/* Setting zero so we can catch bugs in OpenMP/KDOPBVH.
* TODO(sergey): Deduplicate the limits with PBVH from BKE.
*/
-#ifdef DEBUG
-# define KDOPBVH_OMP_LIMIT 0
-#else
-# define KDOPBVH_OMP_LIMIT 1024
+#ifdef _OPENMP
+# ifdef DEBUG
+# define KDOPBVH_OMP_LIMIT 0
+# else
+# define KDOPBVH_OMP_LIMIT 1024
+# endif
#endif
typedef unsigned char axis_t;
@@ -759,7 +761,7 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
/* Loop all branches on this level */
-//#pragma omp parallel for private(j) schedule(static) if (num_leafs > KDOPBVH_OMP_LIMIT)
+#pragma omp parallel for private(j) schedule(static) if (num_leafs > KDOPBVH_OMP_LIMIT)
for (j = i; j < end_j; j++) {
int k;
const int parent_level_index = j - i;
@@ -1112,7 +1114,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
data[j]->stop_axis = min_axis(tree1->stop_axis, tree2->stop_axis);
}
-//#pragma omp parallel for private(j) schedule(static) if (tree1->totleaf > KDOPBVH_OMP_LIMIT)
+#pragma omp parallel for private(j) schedule(static) if (tree1->totleaf > KDOPBVH_OMP_LIMIT)
for (j = 0; j < MIN2(tree1->tree_type, tree1->nodes[tree1->totleaf]->totnode); j++) {
traverse(data[j], tree1->nodes[tree1->totleaf]->children[j], tree2->nodes[tree2->totleaf]);
}