1#ifndef STAN_MATH_PRIM_META_PROMOTE_SCALAR_TYPE_HPP
2#define STAN_MATH_PRIM_META_PROMOTE_SCALAR_TYPE_HPP
21template <
typename T,
typename S,
typename Enable =
void>
37template <
typename T,
typename S>
42 using type = std::vector<typename promote_scalar_type<T, S>::type>;
51template <
typename T,
typename S>
57 using type = std::decay_t<S>;
66template <
typename T,
typename S>
84template <
typename T,
typename S>
89 using type =
typename std::conditional<
90 std::is_same<typename Eigen::internal::traits<std::decay_t<S>>::XprKind,
91 Eigen::MatrixXpr>::value,
92 Eigen::Matrix<typename promote_scalar_type<T, typename S::Scalar>::type,
93 S::RowsAtCompileTime, S::ColsAtCompileTime>,
94 Eigen::Array<typename promote_scalar_type<T, typename S::Scalar>::type,
95 S::RowsAtCompileTime, S::ColsAtCompileTime>>
::type;
98template <
typename T,
typename S>
103 using type = Eigen::SparseMatrix<
105 typename S::StorageIndex>;
108template <
typename... PromotionScalars,
typename... UnPromotedTypes>
110 std::tuple<UnPromotedTypes...>> {
112 std::decay_t<PromotionScalars>, std::decay_t<UnPromotedTypes>>
::type...>;
115template <
typename T,
typename S>
require_t< is_eigen_dense_base< std::decay_t< T > > > require_eigen_dense_base_t
Require type satisfies is_eigen_dense_base.
require_t< is_eigen_sparse_base< std::decay_t< T > > > require_eigen_sparse_base_t
Require type satisfies is_eigen_sparse_base.
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
typename promote_scalar_type< std::decay_t< T >, std::decay_t< S > >::type promote_scalar_t
std::enable_if_t< math::conjunction< Checks... >::value > require_all_t
If all conditions are true, template is enabled Returns a type void if all conditions are true and ot...
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...
Check if type derives from EigenBase
Defines a static member named value which is defined to be false as the primitive scalar types cannot...