diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-09 19:01:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-09 19:22:46 +0300 |
commit | 965bd53e02a3105adbceb47ab0560279e6c2c135 (patch) | |
tree | dd3d4b71cd89245ac4bf6189285dc50acee8bd88 /source/blender | |
parent | 05f15645ec9b6d7a1812b0a5463e6135f1172e97 (diff) |
Cleanup: use doxy sections for task_iterator.c
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/task_iterator.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/task_iterator.c b/source/blender/blenlib/intern/task_iterator.c index 3914a074d11..c45cc2b18b8 100644 --- a/source/blender/blenlib/intern/task_iterator.c +++ b/source/blender/blenlib/intern/task_iterator.c @@ -35,6 +35,10 @@ #include "atomic_ops.h" +/* -------------------------------------------------------------------- */ +/** \name Macros + * \{ */ + /* Allows to avoid using malloc for userdata_chunk in tasks, when small enough. */ #define MALLOCA(_size) ((_size) <= 8192) ? alloca((_size)) : MEM_mallocN((_size), __func__) #define MALLOCA_FREE(_mem, _size) \ @@ -43,6 +47,12 @@ } \ ((void)0) +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Generic Iteration + * \{ */ + BLI_INLINE void task_parallel_calc_chunk_size(const TaskParallelSettings *settings, const int tot_items, int num_tasks, @@ -300,6 +310,12 @@ void BLI_task_parallel_iterator(void *userdata, task_parallel_iterator_do(settings, &state); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name ListBase Iteration + * \{ */ + static void task_parallel_listbase_get(void *__restrict UNUSED(userdata), const TaskParallelTLS *__restrict UNUSED(tls), void **r_next_item, @@ -349,6 +365,12 @@ void BLI_task_parallel_listbase(ListBase *listbase, task_parallel_iterator_do(settings, &state); } +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name MemPool Iteration + * \{ */ + typedef struct ParallelMempoolState { void *userdata; TaskParallelMempoolFunc func; @@ -473,3 +495,5 @@ void BLI_task_parallel_mempool(BLI_mempool *mempool, #undef MALLOCA #undef MALLOCA_FREE + +/** \} */ |