Definition at line 25 of file TSequentialExecutor.hxx.
Public Member Functions | |
| TSequentialExecutor ()=default | |
| TSequentialExecutor (const TSequentialExecutor &)=delete | |
| template<class F, class T> | |
| void | Foreach (F func, const std::vector< T > &args) |
| Execute a function over the elements of an immutable vector, dividing the execution in nChunks. | |
| template<class F, class INTEGER> | |
| void | Foreach (F func, ROOT::TSeq< INTEGER > args) |
| Execute a function over a sequence of indexes, dividing the execution in nChunks. | |
| template<class F, class T> | |
| void | Foreach (F func, std::initializer_list< T > args) |
| Execute a function over the elements of an initializer_list, dividing the execution in nChunks. | |
| template<class F, class T> | |
| void | Foreach (F func, std::vector< T > &args) |
| Execute a function over the elements of a vector, dividing the execution in nChunks. | |
| template<class F> | |
| void | Foreach (F func, unsigned nTimes) |
| Execute a function without arguments several times, dividing the execution in nChunks. | |
| unsigned | GetPoolSize () const |
| Return the number of workers in the sequential executor: a single one. | |
| auto | Map (F func, unsigned nTimes) -> std::vector< InvokeResult_t< F > > |
| Execute a function without arguments several times. | |
| auto | MapReduce (F func, unsigned nTimes, R redfunc) -> InvokeResult_t< F > |
| Execute a function without arguments several times (Map) and accumulate the results into a single value (Reduce). | |
| TSequentialExecutor & | operator= (const TSequentialExecutor &)=delete |
| T * | Reduce (const std::vector< T * > &mergeObjs) |
| "Reduce" an std::vector into a single object by using the object's Merge method. | |
Protected Types | |
| using | InvokeResult_t |
| using | validMapReturnCond |
| type definition used in templated functions for not allowing mapping functions that return references or void. | |
Private Member Functions | |
| TSequentialExecutor & | Derived () |
| template<class F, class T, class Cond = validMapReturnCond<F, T>> | |
| auto | MapImpl (F func, const std::vector< T > &args) -> std::vector< InvokeResult_t< F, T > > |
| Execute a function over the elements of an immutable vector. | |
| template<class F, class INTEGER, class Cond = validMapReturnCond<F, INTEGER>> | |
| auto | MapImpl (F func, ROOT::TSeq< INTEGER > args) -> std::vector< InvokeResult_t< F, INTEGER > > |
| Execute a function over a sequence of indexes. | |
| template<class F, class T, class Cond = validMapReturnCond<F, T>> | |
| auto | MapImpl (F func, std::vector< T > &args) -> std::vector< InvokeResult_t< F, T > > |
| Execute a function over the elements of a vector in parallel Implementation of the Map method. | |
| template<class F, class Cond = validMapReturnCond<F>> | |
| auto | MapImpl (F func, unsigned nTimes) -> std::vector< InvokeResult_t< F > > |
| Execute a function without arguments several times. | |
Private Attributes | |
| friend | TExecutorCRTP |
#include <ROOT/TSequentialExecutor.hxx>
|
protectedinherited |
Definition at line 107 of file TExecutorCRTP.hxx.
|
protectedinherited |
type definition used in templated functions for not allowing mapping functions that return references or void.
The resulting vector elements must be assignable, references aren't.
Definition at line 112 of file TExecutorCRTP.hxx.
|
default |
|
delete |
|
inlineprivateinherited |
Definition at line 156 of file TExecutorCRTP.hxx.
| void ROOT::TSequentialExecutor::Foreach | ( | F | func, |
| const std::vector< T > & | args ) |
Execute a function over the elements of an immutable vector, dividing the execution in nChunks.
| func | Function to be executed on the elements of the immutable vector passed as second parameter. |
| args | Immutable vector of elements passed as an argument to func. |
Definition at line 131 of file TSequentialExecutor.hxx.
| void ROOT::TSequentialExecutor::Foreach | ( | F | func, |
| ROOT::TSeq< INTEGER > | args ) |
Execute a function over a sequence of indexes, dividing the execution in nChunks.
| func | Function to be executed. Must take an element of the sequence passed assecond argument as a parameter. |
| args | Sequence of indexes to execute func on. |
Definition at line 98 of file TSequentialExecutor.hxx.
| void ROOT::TSequentialExecutor::Foreach | ( | F | func, |
| std::initializer_list< T > | args ) |
Execute a function over the elements of an initializer_list, dividing the execution in nChunks.
| func | Function to be executed on the elements of the initializer_list passed as second parameter. |
| args | initializer_list for a vector to apply func on. |
Definition at line 108 of file TSequentialExecutor.hxx.
| void ROOT::TSequentialExecutor::Foreach | ( | F | func, |
| std::vector< T > & | args ) |
Execute a function over the elements of a vector, dividing the execution in nChunks.
| func | Function to be executed on the elements of the vector passed as second parameter. |
| args | Vector of elements passed as an argument to func. |
Definition at line 119 of file TSequentialExecutor.hxx.
Execute a function without arguments several times, dividing the execution in nChunks.
| func | Function to be executed. |
| nTimes | Number of times function should be called. |
Definition at line 88 of file TSequentialExecutor.hxx.
|
inline |
Return the number of workers in the sequential executor: a single one.
Definition at line 65 of file TSequentialExecutor.hxx.
|
inherited |
Execute a function without arguments several times.
| func | Function to be executed. |
| nTimes | Number of times function should be called. |
Definition at line 123 of file TExecutorCRTP.hxx.
|
private |
Execute a function over the elements of an immutable vector.
Implementation of the Map method.
Definition at line 191 of file TSequentialExecutor.hxx.
|
private |
Execute a function over a sequence of indexes.
Implementation of the Map method.
Definition at line 159 of file TSequentialExecutor.hxx.
|
private |
Execute a function over the elements of a vector in parallel Implementation of the Map method.
Definition at line 174 of file TSequentialExecutor.hxx.
|
private |
Execute a function without arguments several times.
Implementation of the Map method.
Definition at line 143 of file TSequentialExecutor.hxx.
|
inherited |
Execute a function without arguments several times (Map) and accumulate the results into a single value (Reduce).
| func | Function to be executed. |
| nTimes | Number of times function should be called. |
| redfunc | Reduction function to combine the results of the calls to func. Must return the same type as func. |
Definition at line 137 of file TExecutorCRTP.hxx.
|
delete |
|
inherited |
"Reduce" an std::vector into a single object by using the object's Merge method.
| mergeObjs | A vector of ROOT objects implementing the Merge method |
Definition at line 151 of file TExecutorCRTP.hxx.
|
private |
Definition at line 26 of file TSequentialExecutor.hxx.