cpp-toolbox  0.0.1
A toolbox library for C++
Loading...
Searching...
No Matches
parallel_tbb.hpp File Reference
#include <algorithm>
#include <cmath>
#include <future>
#include <iterator>
#include <numeric>
#include <stdexcept>
#include <vector>
#include <cpp-toolbox/base/thread_pool_singleton.hpp>
#include <cpp-toolbox/cpp-toolbox_export.hpp>
#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>
#include <tbb/parallel_for_each.h>
#include <tbb/parallel_reduce.h>
#include <tbb/parallel_scan.h>
#include <tbb/parallel_sort.h>
Include dependency graph for parallel_tbb.hpp:

Go to the source code of this file.

Namespaces

namespace  toolbox
 
namespace  toolbox::concurrent
 

Functions

base::thread_pool_singleton_ttoolbox::concurrent::default_pool ()
 获取默认线程池实例/Get the default thread pool instance
 
template<typename Iterator , typename Function >
void toolbox::concurrent::parallel_for_each (Iterator begin, Iterator end, Function func)
 使用TBB并行对范围[begin, end)中的每个元素应用函数
 
template<typename InputIt , typename OutputIt , typename UnaryOperation >
void toolbox::concurrent::parallel_transform (InputIt first1, InputIt last1, OutputIt d_first, UnaryOperation unary_op)
 使用TBB并行转换范围[first1, last1)中的元素并存储到从d_first开始的范围
 
template<typename Iterator , typename T , typename BinaryOperation >
toolbox::concurrent::parallel_reduce (Iterator begin, Iterator end, T identity, BinaryOperation reduce_op)
 使用TBB对范围[begin, end)执行并行归约操作
 
template<typename InputIt , typename OutputIt , typename T , typename BinaryOperation >
void toolbox::concurrent::parallel_inclusive_scan (InputIt first, InputIt last, OutputIt d_first, T init, BinaryOperation binary_op, T identity)
 使用TBB执行并行包含扫描操作
 
template<typename RandomIt , typename Compare >
void toolbox::concurrent::parallel_merge_sort (RandomIt begin, RandomIt end, Compare comp)
 使用TBB实现并行合并排序
 
template<typename RandomIt , typename Compare >
void toolbox::concurrent::parallel_tim_sort (RandomIt begin, RandomIt end, Compare comp)
 使用TBB实现并行TimSort