|
Blender V5.0
|
#include <cstdlib>#include "MEM_guardedalloc.h"#include "BLI_mempool.h"#include "BLI_mempool_private.h"#include "BLI_task.h"Go to the source code of this file.
Classes | |
| struct | ParallelMempoolState |
Macros | |
Macros | |
| #define | MALLOCA(_size) |
| #define | MALLOCA_FREE(_mem, _size) |
Functions | |
MemPool Iteration | |
| static void | parallel_mempool_func (TaskPool *__restrict pool, void *taskdata) |
| void | BLI_task_parallel_mempool (BLI_mempool *mempool, void *userdata, TaskParallelMempoolFunc func, const TaskParallelSettings *settings) |
Parallel tasks over all elements in a container.
Definition in file task_iterator.cc.
| #define MALLOCA | ( | _size | ) |
Definition at line 24 of file task_iterator.cc.
Referenced by BLI_task_parallel_mempool().
| #define MALLOCA_FREE | ( | _mem, | |
| _size ) |
Definition at line 25 of file task_iterator.cc.
Referenced by BLI_task_parallel_mempool().
| void BLI_task_parallel_mempool | ( | struct BLI_mempool * | mempool, |
| void * | userdata, | ||
| TaskParallelMempoolFunc | func, | ||
| const TaskParallelSettings * | settings ) |
This function allows to parallelize for loops over Mempool items.
| mempool | The iterable BLI_mempool to loop over. |
| userdata | Common userdata passed to all instances of func. |
| func | Callback function. |
| settings | See public API doc of TaskParallelSettings for description of all settings. |
Definition at line 55 of file task_iterator.cc.
References BLI_mempool_iternew(), BLI_mempool_iterstep(), BLI_mempool_len(), BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), BLI_task_scheduler_num_threads(), TaskParallelSettings::func_free, TaskParallelSettings::func_init, TaskParallelSettings::func_reduce, i, MALLOCA, MALLOCA_FREE, mempool_iter_threadsafe_create(), mempool_iter_threadsafe_destroy(), parallel_mempool_func(), state, task_pool, TASK_PRIORITY_HIGH, ParallelMempoolTaskData::tls, UNLIKELY, TaskParallelSettings::use_threading, TaskParallelSettings::userdata_chunk, TaskParallelTLS::userdata_chunk, and TaskParallelSettings::userdata_chunk_size.
Referenced by blender::bke::armature_deform_editmesh(), lattice_deform_coords_impl(), TEST(), and TEST().
|
static |
Definition at line 42 of file task_iterator.cc.
References BLI_task_pool_user_data(), mempool_iter_threadsafe_step(), and state.
Referenced by BLI_task_parallel_mempool().