From 93d0a2c2244637cbd02381241e4ea075106b0044 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 28 Jul 2014 20:41:37 +1000 Subject: Warnings --- source/blender/blenlib/intern/BLI_kdopbvh.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source/blender/blenlib/intern') 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]); } -- cgit v1.2.3