19# include <tbb/blocked_range.h>
20# include <tbb/task_arena.h>
21# if TBB_INTERFACE_VERSION_MAJOR >= 10
22# include <tbb/global_control.h>
23# define WITH_TBB_GLOBAL_CONTROL
30#ifdef WITH_TBB_GLOBAL_CONTROL
31static tbb::global_control *task_scheduler_global_control =
nullptr;
36#ifdef WITH_TBB_GLOBAL_CONTROL
39 if (threads_override_num > 0) {
42 task_scheduler_global_control = MEM_new<tbb::global_control>(
43 __func__, tbb::global_control::max_allowed_parallelism, threads_override_num);
60#ifdef WITH_TBB_GLOBAL_CONTROL
61 MEM_delete(task_scheduler_global_control);
74 tbb::this_task_arena::isolate([&] { func(userdata); });
void BLI_task_scheduler_init(void)
int BLI_task_scheduler_num_threads(void)
void BLI_task_isolate(void(*func)(void *userdata), void *userdata)
void BLI_task_scheduler_exit(void)
int BLI_system_thread_count(void)
int BLI_system_num_threads_override_get(void)
Read Guarded memory(de)allocation.
static int task_scheduler_num_threads