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:
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdopbvh.c')
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index d2fc5c7b72b..10e29e09827 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -874,14 +874,9 @@ static void non_recursive_bvh_div_nodes(BVHTree *tree, BVHNode *branches_array,
cb_data.i = i;
cb_data.depth = depth;
- if (num_leafs > KDOPBVH_THREAD_LEAF_THRESHOLD) {
- BLI_task_parallel_range_ex(i, end_j, &cb_data, NULL, 0, non_recursive_bvh_div_nodes_task_cb, 0, false);
- }
- else {
- for (j = i; j < end_j; j++) {
- non_recursive_bvh_div_nodes_task_cb(&cb_data, NULL, j);
- }
- }
+ BLI_task_parallel_range_ex(
+ i, end_j, &cb_data, NULL, 0, non_recursive_bvh_div_nodes_task_cb,
+ num_leafs > KDOPBVH_THREAD_LEAF_THRESHOLD, false);
}
}
@@ -1266,14 +1261,9 @@ BVHTreeOverlap *BLI_bvhtree_overlap(
data[j].thread = j;
}
- if (tree1->totleaf > KDOPBVH_THREAD_LEAF_THRESHOLD) {
- BLI_task_parallel_range_ex(0, thread_num, data, NULL, 0, bvhtree_overlap_task_cb, 0, false);
- }
- else {
- for (j = 0; j < thread_num; j++) {
- bvhtree_overlap_task_cb(data, NULL, j);
- }
- }
+ BLI_task_parallel_range_ex(
+ 0, thread_num, data, NULL, 0, bvhtree_overlap_task_cb,
+ tree1->totleaf > KDOPBVH_THREAD_LEAF_THRESHOLD, false);
for (j = 0; j < thread_num; j++)
total += BLI_stack_count(data[j].overlap);