Automatic Differentiation
 
Loading...
Searching...
No Matches
include_summand.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_META_INCLUDE_SUMMAND_HPP
2#define STAN_MATH_PRIM_META_INCLUDE_SUMMAND_HPP
3
7#include <type_traits>
8
9namespace stan {
10namespace math {
11
36template <bool propto, typename T = double, typename... T_pack>
38 : bool_constant<(!stan::is_constant_all<scalar_type_t<T>>::value
39 || include_summand<propto, T_pack...>::value)> {};
40
46template <bool propto, typename T>
47struct include_summand<propto, T>
49 !propto
50 || !stan::is_constant_all<typename scalar_type<T>::type>::value)> {};
51
52} // namespace math
53
54} // namespace stan
55
56#endif
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Template metaprogram to calculate whether a summand needs to be included in a proportional (log) prob...