29#include "PTL/Config.hh"
35#if defined(PTL_USE_TBB)
36# if !defined(TBB_PREVIEW_GLOBAL_CONTROL)
37# define TBB_PREVIEW_GLOBAL_CONTROL 1
39# include <tbb/global_control.h>
40# include <tbb/task_arena.h>
41# include <tbb/task_group.h>
50#if defined(PTL_USE_TBB)
68 template <
typename FuncT>
69 inline void run(FuncT f)
74 template <
typename FuncT>
106 (void) max_concurrency;
107 (void) reserved_for_masters;
114 template <
typename FuncT>
115 auto execute(FuncT&& _func) ->
decltype(_func())
139 template <
typename Tp>
static ThreadData *& GetInstance()
VUserTaskQueue * current_queue
std::deque< Tp > TaskStack
TaskStack< VUserTaskQueue * > queue_stack
@ max_allowed_parallelism
global_control(parameter p, size_t value)
static size_t active_value(parameter param)
auto execute(FuncT &&_func) -> decltype(_func())
void initialize(int max_concurrency=automatic, unsigned reserved_for_masters=1)
task_arena(int max_concurrency=automatic, unsigned reserved_for_masters=1)
void run_and_wait(FuncT f)
tbb::task_group tbb_task_group_t
tbb::global_control tbb_global_control_t
tbb::task_arena tbb_task_arena_t