89 tbb::parallel_for(start, end, step,
f);
94 return tbb::parallel_reduce(tbb::blocked_range<decltype(objs.begin())>(objs.begin(), objs.end()),
double{},
95 [redfunc](tbb::blocked_range<decltype(objs.begin())>
const & range,
double init) {
96 return std::accumulate(range.begin(), range.end(),
init, redfunc);
102 return tbb::parallel_reduce(tbb::blocked_range<decltype(objs.begin())>(objs.begin(), objs.end()),
float{},
103 [redfunc](tbb::blocked_range<decltype(objs.begin())>
const & range,
float init) {
104 return std::accumulate(range.begin(), range.end(),
init, redfunc);
std::shared_ptr< TPoolManager > GetPoolManager(UInt_t nThreads=0)
Get a shared pointer to the manager.
Namespace for new ROOT classes and functions.
void ParallelFor(unsigned start, unsigned end, unsigned step, const std::function< void(unsigned int i)> &f)
double ParallelReduce(const std::vector< double > &objs, const std::function< double(double a, double b)> &redfunc)
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
This class provides a simple interface to execute the same task multiple times in parallel...
TThreadExecutor()
Class constructor.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
std::shared_ptr< ROOT::Internal::TPoolManager > fSched