#include <parallel_utilities.h>
|
| | BlockPartition (TIterator it_begin, TIterator it_end, int Nchunks=ParallelUtilities::GetNumThreads()) |
| |
| template<class TUnaryFunction > |
| void | for_each (TUnaryFunction &&f) |
| | simple iteration loop. f called on every entry in rData More...
|
| |
| template<class TReducer , class TUnaryFunction > |
| TReducer::return_type | for_each (TUnaryFunction &&f) |
| | loop allowing reductions. f called on every entry in rData the function f needs to return the values to be used by the reducer More...
|
| |
| template<class TThreadLocalStorage , class TFunction > |
| void | for_each (const TThreadLocalStorage &rThreadLocalStoragePrototype, TFunction &&f) |
| | loop with thread local storage (TLS). f called on every entry in rData More...
|
| |
| template<class TReducer , class TThreadLocalStorage , class TFunction > |
| TReducer::return_type | for_each (const TThreadLocalStorage &rThreadLocalStoragePrototype, TFunction &&f) |
| | loop with thread local storage (TLS) allowing reductions. f called on every entry in rData the function f needs to return the values to be used by the reducer More...
|
| |
template<class TIterator, int MaxThreads = Globals::MaxAllowedThreads>
class Kratos::BlockPartition< TIterator, MaxThreads >
- Parameters
-
| TIterator | - type of iterator (must be a random access iterator) |
| MaxThreads | - maximum number of threads allowed in the partitioning. must be known at compile time to avoid heap allocations in the partitioning |
◆ BlockPartition()
template<class TIterator , int MaxThreads = Globals::MaxAllowedThreads>
- Parameters
-
| it_begin | - iterator pointing at the beginning of the container |
| it_end | - iterator pointing to the end of the container |
| Nchunks | - number of threads to be used in the loop (must be lower than TMaxThreads) |
◆ for_each() [1/4]
template<class TIterator , int MaxThreads = Globals::MaxAllowedThreads>
template<class TThreadLocalStorage , class TFunction >
| void Kratos::BlockPartition< TIterator, MaxThreads >::for_each |
( |
const TThreadLocalStorage & |
rThreadLocalStoragePrototype, |
|
|
TFunction && |
f |
|
) |
| |
|
inline |
loop with thread local storage (TLS). f called on every entry in rData
- Parameters
-
| TThreadLocalStorage | template parameter specifying the thread local storage |
| f | - must be a function accepting as input TContainerType::value_type& and the thread local storage |
◆ for_each() [2/4]
template<class TIterator , int MaxThreads = Globals::MaxAllowedThreads>
template<class TReducer , class TThreadLocalStorage , class TFunction >
| TReducer::return_type Kratos::BlockPartition< TIterator, MaxThreads >::for_each |
( |
const TThreadLocalStorage & |
rThreadLocalStoragePrototype, |
|
|
TFunction && |
f |
|
) |
| |
|
inline |
loop with thread local storage (TLS) allowing reductions. f called on every entry in rData the function f needs to return the values to be used by the reducer
- Parameters
-
| TReducer | template parameter specifying the reduction operation to be done |
| TThreadLocalStorage | template parameter specifying the thread local storage |
| f | - must be a function accepting as input TContainerType::value_type& and the thread local storage |
◆ for_each() [3/4]
template<class TIterator , int MaxThreads = Globals::MaxAllowedThreads>
template<class TUnaryFunction >
simple iteration loop. f called on every entry in rData
- Parameters
-
| f | - must be a unary function accepting as input TContainerType::value_type& |
◆ for_each() [4/4]
template<class TIterator , int MaxThreads = Globals::MaxAllowedThreads>
template<class TReducer , class TUnaryFunction >
loop allowing reductions. f called on every entry in rData the function f needs to return the values to be used by the reducer
- Parameters
-
| TReducer | template parameter specifying the reduction operation to be done |
| f | - must be a unary function accepting as input TContainerType::value_type& |
The documentation for this class was generated from the following file: