diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-25 13:01:59 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-11-25 13:01:59 +0300 |
commit | 0f609d5d04cff4f5553fd56924f17d9b08bef1e8 (patch) | |
tree | e44c15fcc1dbc9bdf3a5742e6c0f8b8e7b849056 /source/blender/blenlib/BLI_task.h | |
parent | 8294452b14fac54443f31fe11950d19370e27b43 (diff) |
BLI_task: BLI_task_parallel_range_ex: add some per-chunk userdata.
This mimics OpenMP's 'firstprivate' feature. It is sometimes handy to have some persistent local data during a whole chunk.
Reviewers: sergey
Reviewed By: sergey
Subscribers: campbellbarton
Differential Revision: https://developer.blender.org/D1635
Diffstat (limited to 'source/blender/blenlib/BLI_task.h')
-rw-r--r-- | source/blender/blenlib/BLI_task.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h index 81c277cd956..45a6e0b02c1 100644 --- a/source/blender/blenlib/BLI_task.h +++ b/source/blender/blenlib/BLI_task.h @@ -112,10 +112,12 @@ ThreadMutex *BLI_task_pool_user_mutex(TaskPool *pool); size_t BLI_task_pool_tasks_done(TaskPool *pool); /* Parallel for routines */ -typedef void (*TaskParallelRangeFunc)(void *userdata, int iter); +typedef void (*TaskParallelRangeFunc)(void *userdata, void *userdata_chunk, int iter); void BLI_task_parallel_range_ex( int start, int stop, void *userdata, + void *userdata_chunk, + const size_t userdata_chunk_size, TaskParallelRangeFunc func, const int range_threshold, const bool use_dynamic_scheduling); |