diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-10 13:52:44 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-10 14:10:21 +0300 |
commit | fcc2175710fa273ef2b72a39bb7de8880f6e7875 (patch) | |
tree | 8a70746d4fe75bf167d6c05d6bda2715c0eae8f5 /source/blender/blenlib/intern/task.c | |
parent | 898d040b0c7c9918b19de52115577f064cb68f66 (diff) |
Fix own mistake in rBd617de965ea20e5d5 from late December 2015.
Brain melt here, intention was to reduce number of tasks in case we have not much chunks of data to loop over,
not to increase it!
Note that this only affected dynamic scheduling.
Diffstat (limited to 'source/blender/blenlib/intern/task.c')
-rw-r--r-- | source/blender/blenlib/intern/task.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c index 9fefd715d76..b47931cdde9 100644 --- a/source/blender/blenlib/intern/task.c +++ b/source/blender/blenlib/intern/task.c @@ -914,7 +914,7 @@ static void task_parallel_range_ex( state.chunk_size = max_ii(1, (stop - start) / (num_tasks)); } - num_tasks = max_ii(1, (stop - start) / state.chunk_size); + num_tasks = min_ii(num_tasks, (stop - start) / state.chunk_size); for (i = 0; i < num_tasks; i++) { BLI_task_pool_push(task_pool, |