Automatic Differentiation
 
Loading...
Searching...
No Matches
reduce_sum.hpp File Reference
#include <stan/math/prim/meta.hpp>
#include <stan/math/prim/err.hpp>
#include <stan/math/prim/functor/apply.hpp>
#include <tbb/task_arena.h>
#include <tbb/parallel_reduce.h>
#include <tbb/blocked_range.h>
#include <algorithm>
#include <tuple>
#include <vector>

Go to the source code of this file.

Classes

struct  stan::math::internal::reduce_sum_impl< ReduceFunction, require_arithmetic_t< ReturnType >, ReturnType, Vec, Args... >
 Specialization of reduce_sum_impl for arithmetic types. More...
 
struct  stan::math::internal::reduce_sum_impl< ReduceFunction, require_arithmetic_t< ReturnType >, ReturnType, Vec, Args... >::recursive_reducer
 This struct is used by the TBB to accumulate partial sums over consecutive ranges of the input. More...
 

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 
namespace  stan::math::internal
 A comparator that works for any container type that has the brackets operator.
 

Functions

template<typename ReduceFunction , typename Vec , typename = require_vector_like_t<Vec>, typename... Args>
auto stan::math::reduce_sum (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.