Automatic Differentiation
 
Loading...
Searching...
No Matches
eigen_comparisons.hpp
Go to the documentation of this file.
1#ifndef STAN_MATH_PRIM_FUN_EIGEN_COMPARISONS_HPP
2#define STAN_MATH_PRIM_FUN_EIGEN_COMPARISONS_HPP
3
7
8namespace stan {
9namespace math {
10
18#define ADD_MIXED_AUTODIFF_SCALAR_COMPARISON(OPERATOR, OP) \
19 template <typename T_a, typename T_b, \
20 require_any_eigen_t<T_a, T_b>* = nullptr, \
21 require_any_st_autodiff<T_a, T_b>* = nullptr, \
22 require_not_st_same<T_a, T_b>* = nullptr> \
23 auto OPERATOR(const T_a& a, const T_b& b) { \
24 return value_of(a) OP value_of(b); \
25 }
26
33
34#undef ADD_MIXED_AUTODIFF_SCALAR_COMPARISON
35
36} // namespace math
37} // namespace stan
38
39#endif
#define ADD_MIXED_AUTODIFF_SCALAR_COMPARISON(OPERATOR, OP)
Add support for comparisons involving Eigen types with different scalars, where one of the scalars is...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...