Stan Math Library
4.9.0
Automatic Differentiation
|
auto stan::math::reduce_sum_static | ( | Vec && | vmapped, |
int | grainsize, | ||
std::ostream * | msgs, | ||
Args &&... | args | ||
) |
Call an instance of the function ReduceFunction
on every element of an input sequence and sum these terms.
This defers to reduce_sum_impl for the appropriate implementation
ReduceFunction must define an operator() with the same signature as: T f(Vec&& vmapped_subset, int start, int end, std::ostream* msgs, Args&&... args)
ReduceFunction
must be default constructible without any arguments
grainsize must be greater than or equal to 1
If STAN_THREADS is not defined, do all the work with one ReduceFunction call.
ReduceFunction | Type of reducer function |
ReturnType | An arithmetic type |
Vec | Type of sliced argument |
Args | Types of shared arguments |
vmapped | Sliced arguments used only in some sum terms | |
grainsize | Suggested grainsize for tbb | |
[in,out] | msgs | The print stream for warning messages |
args | Shared arguments used in every sum term |
Definition at line 45 of file reduce_sum_static.hpp.