Stan Math Library
4.8.1
Automatic Differentiation
|
This struct is used by the TBB to accumulate partial sums over consecutive ranges of the input.
To distribute the workload, the TBB can split larger partial sums into smaller ones in which case the splitting copy constructor is used. It is designed to meet the Imperative form requirements of tbb::parallel_reduce
.
Definition at line 46 of file reduce_sum.hpp.
#include <reduce_sum.hpp>
Public Member Functions | |
recursive_reducer (Vec &&vmapped, std::ostream *msgs, Args &&... args) | |
recursive_reducer (recursive_reducer &other, tbb::split) | |
This is the copy operator as required for tbb::parallel_reduce Imperative form. | |
void | operator() (const tbb::blocked_range< size_t > &r) |
Compute the value and of ReduceFunction over the range defined by r and accumulate those in member variable sum_. | |
void | join (const recursive_reducer &rhs) |
Join reducers. | |
Public Attributes | |
Vec | vmapped_ |
std::stringstream | msgs_ |
std::tuple< Args... > | args_tuple_ |
return_type_t< Vec, Args... > | sum_ {0.0} |