12 #ifndef ROOT_TExecutor 13 #define ROOT_TExecutor 24 explicit TExecutor() =
default;
25 explicit TExecutor(
size_t ){};
27 template<
class F,
class...
T>
28 using noReferenceCond =
typename std::enable_if<
"Function can't return a reference" && !(std::is_reference<
typename std::result_of<
F(
T...)>
::type>::value)>::
type;
33 template<
class F,
class Cond = noReferenceCond<F>>
36 template<
class F,
class INTEGER,
class Cond = noReferenceCond<F, INTEGER>>
38 template<
class F,
class T,
class Cond = noReferenceCond<F, T>>
40 template<
class F,
class T,
class Cond = noReferenceCond<F, T>>
48 template<
class F,
class R,
class Cond = noReferenceCond<F>>
50 template<
class F,
class INTEGER,
class R,
class Cond = noReferenceCond<F, INTEGER>>
53 template<
class F,
class T,
class R,
class Cond = noReferenceCond<F, T>>
55 template<
class F,
class T,
class R,
class Cond = noReferenceCond<F, T>>
59 template<
class T>
T* Reduce(
const std::vector<T*> &mergeObjs);
62 inline subc & Derived()
64 return *
static_cast<subc*
>(
this);
73 template<
class subc>
template<
class F,
class Cond>
76 return Derived().Map(
func, nTimes);
89 template<
class subc>
template<
class F,
class INTEGER,
class Cond>
92 return Derived().Map(
func, args);
95 template<
class subc>
template<
class F,
class T,
class Cond>
98 std::vector<T> vargs(std::move(args));
99 const auto &reslist = Map(
func, vargs);
106 template<
class subc>
template<
class F,
class T,
class Cond>
109 return Derived().Map(
func, args);
118 template<
class subc>
template<
class F,
class R,
class Cond>
121 return Derived().Reduce(Map(
func, nTimes), redfunc);
132 template<
class subc>
template<
class F,
class INTEGER,
class R,
class Cond>
135 return Derived().Reduce(Map(
func, args), redfunc);
138 template<
class subc>
template<
class F,
class T,
class R,
class Cond>
141 return Derived().Reduce(Map(
func, args), redfunc);
144 template<
class subc>
template<
class F,
class T,
class R,
class Cond>
147 return Derived().Reduce(Map(
func, args), redfunc);
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
A pseudo container class which is a generator of indices.
double func(double *x, double *p)