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>2016-12-23 14:33:27 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-03-03 19:42:33 +0300
commit9dab894e641d5190a26c6fafb918d9503cc76f3b (patch)
treea04cdc3617aa48753288934c960ac18f43c4ab45 /source/blender
parent08b0b1c439c8b4f502b7ad503c4de50194280299 (diff)
Inline all task-pushing helpers.
Those are small enough to be worth it, and it does give me ~2% speedup here...
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/intern/task.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
index 560ad7f88e9..e53327640fb 100644
--- a/source/blender/blenlib/intern/task.c
+++ b/source/blender/blenlib/intern/task.c
@@ -235,7 +235,7 @@ static void task_free(TaskPool *pool, Task *task, const int thread_id)
/* Task Scheduler */
-static void task_pool_num_decrease(TaskPool *pool, size_t done)
+BLI_INLINE void task_pool_num_decrease(TaskPool *pool, size_t done)
{
BLI_assert(pool->num >= done);
TaskScheduler *scheduler = pool->scheduler;
@@ -255,7 +255,7 @@ static void task_pool_num_decrease(TaskPool *pool, size_t done)
}
}
-static void task_pool_num_increase(TaskPool *pool)
+BLI_INLINE void task_pool_num_increase(TaskPool *pool)
{
atomic_add_and_fetch_z(&pool->num, 1);
@@ -346,7 +346,7 @@ BLI_INLINE bool task_wait(TaskScheduler * restrict scheduler, int * restrict loo
return false;
}
-static bool task_scheduler_thread_wait_pop(TaskScheduler *scheduler, Task **task)
+BLI_INLINE bool task_scheduler_thread_wait_pop(TaskScheduler *scheduler, Task **task)
{
bool found_task = false;
int loop_count = 0;
@@ -514,7 +514,7 @@ int BLI_task_scheduler_num_threads(TaskScheduler *scheduler)
return scheduler->num_threads + 1;
}
-static void task_scheduler_push(TaskScheduler *scheduler, Task *task, TaskPriority priority)
+BLI_INLINE void task_scheduler_push(TaskScheduler *scheduler, Task *task, TaskPriority priority)
{
TaskPool *pool = task->pool;