1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTE_ELEMENTS_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTE_ELEMENTS_HPP 19 template <
typename T,
typename S,
int R,
int C>
27 inline static Eigen::Matrix<T, R, C>
promote(
28 const Eigen::Matrix<S, R, C>& u) {
29 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> t(u.rows(), u.cols());
30 for (
int i = 0; i < u.size(); ++i)
43 template <
typename T,
int R,
int C>
51 inline static const Eigen::Matrix<T, R, C>&
promote(
52 const Eigen::Matrix<T, R, C>& u) {
(Expert) Numerical traits for algorithmic differentiation variables.