Reference documentation for deal.II version 9.3.3
|
#include <deal.II/base/parallel.h>
Public Member Functions | |
template<typename Reductor > | |
ReductionOnSubranges (const Function &f, const Reductor &reductor, const ResultType neutral_element=ResultType()) | |
ReductionOnSubranges (const ReductionOnSubranges &r, tbb::split) | |
void | join (const ReductionOnSubranges &r) |
template<typename RangeType > | |
void | operator() (const tbb::blocked_range< RangeType > &range) |
Public Attributes | |
ResultType | result |
Private Attributes | |
const Function | f |
const ResultType | neutral_element |
const std::function< ResultType(ResultType, ResultType)> | reductor |
A class that conforms to the Body requirements of the TBB parallel_reduce function. The first template argument denotes the type on which the reduction is to be done. The second denotes the type of the function object that shall be called for each subrange.
Definition at line 541 of file parallel.h.
|
inline |
Constructor. Take the function object to call on each sub-range as well as the neutral element with respect to the reduction operation.
The second argument denotes a function object that will be used to reduce the result of two computations into one number. An example if we want to simply accumulate integer results would be std::plus<int>().
Definition at line 558 of file parallel.h.
|
inline |
Splitting constructor. See the TBB book for more details about this.
Definition at line 570 of file parallel.h.
|
inline |
Join operation: merge the results from computations on different sub- intervals.
Definition at line 582 of file parallel.h.
|
inline |
Execute the given function on the specified range.
Definition at line 592 of file parallel.h.
ResultType parallel::internal::ReductionOnSubranges< ResultType, Function >::result |
A variable that will hold the result of the reduction.
Definition at line 546 of file parallel.h.
|
private |
The function object to call on every sub-range.
Definition at line 601 of file parallel.h.
|
private |
The neutral element with respect to the reduction operation. This is needed when calling the splitting constructor since we have to re-set the result variable in this case.
Definition at line 608 of file parallel.h.
|
private |
The function object to be used to reduce the result of two calls into one number.
Definition at line 614 of file parallel.h.