template<class subc>
class ROOT::TExecutor< subc >
Definition at line 21 of file TExecutor.hxx.
|
template<class F , class... T> |
using | noReferenceCond = typename std::enable_if<"Function can't return a reference"&&!(std::is_reference< typename std::result_of< F(T...)>::type >::value)>::type |
|
|
| TExecutor ()=default |
|
| TExecutor (size_t) |
|
template<class F , class Cond = noReferenceCond<F>> |
auto | Map (F func, unsigned nTimes) -> std::vector< typename std::result_of< F()>::type > |
| Execute func (with no arguments) nTimes in parallel. More...
|
|
template<class F , class T , class Cond = noReferenceCond<F, typename T::value_type>> |
auto | Map (F func, T &args) -> std::vector< decltype(++(args.begin()), args.end(), func(args.front()))> |
|
template<class F , class R , class Cond = noReferenceCond<F>> |
auto | MapReduce (F func, unsigned nTimes, R redfunc) -> typename std::result_of< F()>::type |
|
template<class F , class INTEGER , class R , class Cond = noReferenceCond<F, INTEGER>> |
auto | MapReduce (F func, ROOT::TSeq< INTEGER > args, R redfunc) -> typename std::result_of< F(INTEGER)>::type |
|
|
template<class T , class R > |
auto | Reduce (const std::vector< T > &objs, R redfunc) -> decltype(redfunc(objs)) |
|
template<class T , class BINARYOP > |
auto | Reduce (const std::vector< T > &objs, BINARYOP redfunc) -> decltype(redfunc(objs.front(), objs.front())) |
| Check that redfunc has the right signature and call it on objs. More...
|
|
#include <ROOT/TExecutor.hxx>
template<class subc>
template<class F , class... T>
template<class subc >
template<class F , class Cond >
auto ROOT::TExecutor< subc >::Map |
( |
F |
func, |
|
|
unsigned |
nTimes |
|
) |
| -> std::vector<typename std::result_of<F()>::type> |
Execute func (with no arguments) nTimes in parallel.
A vector containg executions' results is returned. Functions that take more than zero arguments can be executed (with fixed arguments) by wrapping them in a lambda or with std::bind.
Definition at line 79 of file TExecutor.hxx.
template<class subc>
template<class F , class T , class Cond = noReferenceCond<F, typename T::value_type>>
auto ROOT::TExecutor< subc >::Map |
( |
F |
func, |
|
|
T & |
args |
|
) |
| -> std::vector< decltype(++(args.begin()), args.end(), func(args.front()))> |
template<class subc>
template<class F , class R , class Cond = noReferenceCond<F>>
auto ROOT::TExecutor< subc >::MapReduce |
( |
F |
func, |
|
|
unsigned |
nTimes, |
|
|
R |
redfunc |
|
) |
| -> typename std::result_of< F()>::type |
template<class subc>
template<class F , class INTEGER , class R , class Cond = noReferenceCond<F, INTEGER>>
template<class subc >
template<class T , class R >
auto ROOT::TExecutor< subc >::Reduce |
( |
const std::vector< T > & |
objs, |
|
|
R |
redfunc |
|
) |
| -> decltype(redfunc(objs)) |
|
protected |
template<class subc >
template<class T , class BINARYOP >
auto ROOT::TExecutor< subc >::Reduce |
( |
const std::vector< T > & |
objs, |
|
|
BINARYOP |
redfunc |
|
) |
| -> decltype(redfunc(objs.front(), objs.front())) |
|
protected |
Check that redfunc has the right signature and call it on objs.
Definition at line 159 of file TExecutor.hxx.
The documentation for this class was generated from the following file: