1#ifndef STAN_MATH_PRIM_META_POSSIBLY_SUM_HPP
2#define STAN_MATH_PRIM_META_POSSIBLY_SUM_HPP
17template <
typename CondSum,
typename T, require_t<CondSum>* =
nullptr>
19 return sum(std::forward<T>(x));
29template <
typename CondSum,
typename T1, require_not_t<CondSum>* =
nullptr>
31 return std::forward<T1>(x);
auto possibly_sum(T &&x)
Conditionally sum the input at compile time.
auto sum(const std::vector< T > &m)
Return the sum of the entries of the specified standard vector.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...