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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-07-30 15:56:47 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-07-30 15:56:47 +0300
commit5f405728bb4a6c32308371905955e87db851e5aa (patch)
tree8e8a4f6d51cd8f87678ff9200e35cc71a4240e46 /source/blender/blenlib/intern/BLI_kdopbvh.c
parentb9c257019fe256af6c2978b94b4948d18a6cd4eb (diff)
BLI_task: Cleanup: rename some structs to make them more generic.
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_kdopbvh.c')
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index f43f55a352b..f1811ff6e4f 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -700,7 +700,7 @@ typedef struct BVHDivNodesData {
static void non_recursive_bvh_div_nodes_task_cb(void *__restrict userdata,
const int j,
- const ParallelRangeTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict UNUSED(tls))
{
BVHDivNodesData *data = userdata;
@@ -841,14 +841,14 @@ static void non_recursive_bvh_div_nodes(const BVHTree *tree,
cb_data.depth = depth;
if (true) {
- ParallelRangeSettings settings;
+ TaskParallelSettings settings;
BLI_parallel_range_settings_defaults(&settings);
settings.use_threading = (num_leafs > KDOPBVH_THREAD_LEAF_THRESHOLD);
BLI_task_parallel_range(i, i_stop, &cb_data, non_recursive_bvh_div_nodes_task_cb, &settings);
}
else {
/* Less hassle for debugging. */
- ParallelRangeTLS tls = {0};
+ TaskParallelTLS tls = {0};
for (int i_task = i; i_task < i_stop; i_task++) {
non_recursive_bvh_div_nodes_task_cb(&cb_data, i_task, &tls);
}
@@ -1195,7 +1195,7 @@ int BLI_bvhtree_overlap_thread_num(const BVHTree *tree)
static void bvhtree_overlap_task_cb(void *__restrict userdata,
const int j,
- const ParallelRangeTLS *__restrict UNUSED(tls))
+ const TaskParallelTLS *__restrict UNUSED(tls))
{
BVHOverlapData_Thread *data = &((BVHOverlapData_Thread *)userdata)[j];
BVHOverlapData_Shared *data_shared = data->shared;
@@ -1262,7 +1262,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(
data[j].thread = j;
}
- ParallelRangeSettings settings;
+ TaskParallelSettings settings;
BLI_parallel_range_settings_defaults(&settings);
settings.use_threading = (tree1->totleaf > KDOPBVH_THREAD_LEAF_THRESHOLD);
BLI_task_parallel_range(0, thread_num, data, bvhtree_overlap_task_cb, &settings);