48#if defined(PTL_USE_TBB)
65template <
typename Tp,
typename Arg = Tp,
intmax_t MaxDepth = 0>
70 template <
typename Up>
89 using iterator =
typename future_list_t::iterator;
94 template <
typename... Args>
100 template <
typename Func>
103 template <
typename Up = Tp>
120 template <
typename Up>
166 template <
typename Func,
typename... Args>
173 template <
typename Func,
typename... Args,
typename Up = Tp>
176 template <
typename Func,
typename... Args,
typename Up = Tp>
179 template <
typename Func,
typename... Args>
182 exec(std::move(func), std::move(
args)...);
186 template <
typename Up,
typename Func,
typename... Args>
189 template <
typename Up,
typename Func,
typename... Args>
221 template <typename Up = Tp, enable_if_t<!std::is_void<Up>::value,
int> = 0>
225 template <
typename Up = Tp,
typename Rp = Arg,
230 template <
typename Up = Tp,
typename Rp = Arg,
std::atomic_intmax_t atomic_int
container_type< future_type > future_list_t
typename future_list_t::reverse_iterator reverse_iterator
ThreadPool * pool() const
std::promise< ArgTp > promise_type
future_list_t m_future_list
tbb_task_group_t * m_tbb_task_group
std::atomic_uintmax_t atomic_uint
std::vector< Up > container_type
TaskGroup(const this_type &)=delete
const atomic_int & task_count() const
typename JoinFunction< Tp, Arg >::Type join_type
TaskGroup(ThreadPool *_tp=internal::get_default_threadpool(), enable_if_t< std::is_void< Up >::value, int >=0)
const future_list_t & get_tasks() const
bool is_native_task_group() const
typename future_list_t::const_iterator const_iterator
std::packaged_task< ArgTp()> packaged_task_type
static void set_verbose(int level)
enable_if_t< std::is_void< Up >::value, void > local_exec(Func func, Args... args)
static tid_type this_tid()
atomic_int m_tot_task_count
atomic_int & task_count()
const_reverse_iterator critr_t
condition_t & task_cond()
std::shared_ptr< task_type< Args... > > wrap(Func func, Args... args)
void run(Func func, Args... args)
future_list_t & get_tasks()
enable_if_t<!std::is_void< Up >::value, void > local_exec(Func func, Args... args)
typename future_list_t::iterator iterator
TaskGroup(Func &&_join, ThreadPool *_tp=internal::get_default_threadpool())
enable_if_t< std::is_void< Up >::value, void > exec(Func func, Args... args)
typename future_list_t::const_reverse_iterator const_reverse_iterator
std::shared_ptr< TaskFuture< ArgTp > > task_pointer
void set_pool(ThreadPool *tp)
std::future< ArgTp > future_type
TaskGroup(this_type &&rhs)=default
container_type< task_pointer > task_list_t
enable_if_t<!std::is_void< Up >::value, void > exec(Func func, Args... args)
this_type & operator=(const this_type &rhs)=delete
this_type & operator=(this_type &&rhs)=default
ScopeDestructor get_scope_destructor()
std::shared_ptr< Up > operator+=(std::shared_ptr< Up > &&_task)
The task class is supplied to thread_pool.
std::shared_ptr< T > shared_ptr
intmax_t get_task_depth()
ThreadPool * get_default_threadpool()
std::atomic_uintmax_t & task_group_counter()
std::condition_variable Condition
typename std::decay< T >::type decay_t
typename std::enable_if< B, T >::type enable_if_t
std::function< JoinT(JoinT &, JoinArg &&)> Type