diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-13 12:03:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-05-13 13:06:15 +0300 |
commit | 868cfc5a4a04f3f22f891ad3213cee5ceddea009 (patch) | |
tree | b66e1168780cf3c7c93b0f777422757fc3705b0a /source/blender/blenlib/BLI_task.h | |
parent | 990fab73eaf10688b65a4344bcdf5b84ded2ec85 (diff) |
BLI_task: add support for listbase parallelized for loops.
Code by @sergey, with small edits and doc by @mont29.
Diffstat (limited to 'source/blender/blenlib/BLI_task.h')
-rw-r--r-- | source/blender/blenlib/BLI_task.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index 4cf1d8baaf0..c511ec432ee 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -21,6 +21,9 @@ #ifndef __BLI_TASK_H__ #define __BLI_TASK_H__ +struct Link; +struct ListBase; + /** \file BLI_task.h * \ingroup bli */ @@ -129,6 +132,15 @@ void BLI_task_parallel_range( TaskParallelRangeFunc func, const bool use_threading); +typedef void (*TaskParallelListbaseFunc)(void *userdata, + struct Link *iter, + int index); +void BLI_task_parallel_listbase( + struct ListBase *listbase, + void *userdata, + TaskParallelListbaseFunc func, + const bool use_threading); + #ifdef __cplusplus } #endif |