[Bf-blender-cvs] [862981a733c] temp-tbb-task-scheduler: Task: don't use suspended task pool for iterators

Brecht Van Lommel noreply at git.blender.org
Tue Nov 5 15:10:53 CET 2019


Commit: 862981a733cb0c7bbeb730941e4c60e60cab733f
Author: Brecht Van Lommel
Date:   Sat Oct 12 17:11:36 2019 +0200
Branches: temp-tbb-task-scheduler
https://developer.blender.org/rB862981a733cb0c7bbeb730941e4c60e60cab733f

Task: don't use suspended task pool for iterators

There is no apparent reason for this, and it has extra overhead.

===================================================================

M	source/blender/blenlib/intern/task_iterator.c

===================================================================

diff --git a/source/blender/blenlib/intern/task_iterator.c b/source/blender/blenlib/intern/task_iterator.c
index 10e3c551cf5..831034f6dce 100644
--- a/source/blender/blenlib/intern/task_iterator.c
+++ b/source/blender/blenlib/intern/task_iterator.c
@@ -244,7 +244,7 @@ void BLI_task_parallel_range(const int start,
     return;
   }
 
-  task_pool = BLI_task_pool_create_suspended(task_scheduler, &state, TASK_PRIORITY_HIGH);
+  task_pool = BLI_task_pool_create(task_scheduler, &state, TASK_PRIORITY_HIGH);
 
   /* NOTE: This way we are adding a memory barrier and ensure all worker
    * threads can read and modify the value, without any locks. */
@@ -420,7 +420,7 @@ static void task_parallel_iterator_do(const TaskParallelSettings *settings,
   void *userdata_chunk_array = NULL;
   const bool use_userdata_chunk = (userdata_chunk_size != 0) && (userdata_chunk != NULL);
 
-  TaskPool *task_pool = BLI_task_pool_create_suspended(task_scheduler, state, TASK_PRIORITY_HIGH);
+  TaskPool *task_pool = BLI_task_pool_create(task_scheduler, state, TASK_PRIORITY_HIGH);
 
   if (use_userdata_chunk) {
     userdata_chunk_array = MALLOCA(userdata_chunk_size * num_tasks);
@@ -599,7 +599,7 @@ void BLI_task_parallel_mempool(BLI_mempool *mempool,
   }
 
   task_scheduler = BLI_task_scheduler_get();
-  task_pool = BLI_task_pool_create_suspended(task_scheduler, &state, TASK_PRIORITY_HIGH);
+  task_pool = BLI_task_pool_create(task_scheduler, &state, TASK_PRIORITY_HIGH);
   num_threads = BLI_task_scheduler_num_threads(task_scheduler);
 
   /* The idea here is to prevent creating task for each of the loop iterations



More information about the Bf-blender-cvs mailing list