1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROMOTER_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_PROMOTER_HPP 12 template <
typename F,
typename T>
14 inline static void promote(
const F& u, T& t) {
24 inline static void promote(
const T& u, T& t) {
33 template <
typename F,
typename T>
35 inline static void promote(
const std::vector<F>& u,
38 for (
size_t i = 0; i < u.size(); ++i)
41 inline static std::vector<T>
51 inline static void promote(
const std::vector<T>& u,
55 inline static std::vector<T>
promote_to(
const std::vector<T>& u) {
61 template <
typename F,
typename T,
int R,
int C>
63 inline static void promote(
const Eigen::Matrix<F, R, C>& u,
64 Eigen::Matrix<T, R, C>& t) {
65 t.resize(u.rows(), u.cols());
66 for (
int i = 0; i < u.size(); ++i)
69 inline static Eigen::Matrix<T, R, C>
71 Eigen::Matrix<T, R, C> t;
78 template <
typename T,
int R,
int C>
80 inline static void promote(
const Eigen::Matrix<T, R, C>& u,
81 Eigen::Matrix<T, R, C>& t) {
84 inline static Eigen::Matrix<T, R, C>
(Expert) Numerical traits for algorithmic differentiation variables.