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/math_statistics.c')
-rw-r--r--source/blender/blenlib/intern/math_statistics.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_statistics.c b/source/blender/blenlib/intern/math_statistics.c
index cfadbba028f..14e3aaea053 100644
--- a/source/blender/blenlib/intern/math_statistics.c
+++ b/source/blender/blenlib/intern/math_statistics.c
@@ -118,8 +118,14 @@ void BLI_covariance_m_vn_ex(
.covfac = covfac, .n = n, .nbr_cos_vn = nbr_cos_vn,
};
+ ParallelRangeSettings settings;
+ BLI_parallel_range_settings_defaults(&settings);
+ settings.use_threading = ((nbr_cos_vn * n * n) >= 10000);
BLI_task_parallel_range(
- 0, n * n, &data, covariance_m_vn_ex_task_cb, (nbr_cos_vn * n * n) >= 10000);
+ 0, n * n,
+ &data,
+ covariance_m_vn_ex_task_cb,
+ &settings);
}
/**