Automatic Differentiation
 
Loading...
Searching...
No Matches
promote_scalar.hpp File Reference
#include <stan/math/prim/fun/Eigen.hpp>
#include <stan/math/prim/meta.hpp>
#include <vector>
#include <tuple>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 

Functions

template<typename PromotionScalar , typename UnPromotedType , require_constructible_t< PromotionScalar, UnPromotedType > * = nullptr, require_not_same_t< PromotionScalar, UnPromotedType > * = nullptr, require_all_not_tuple_t< PromotionScalar, UnPromotedType > * = nullptr>
constexpr auto stan::math::promote_scalar (UnPromotedType &&x)
 Promote a scalar to another scalar type.
 
template<typename PromotionScalar , typename UnPromotedType , require_same_t< PromotionScalar, scalar_type_t< UnPromotedType > > * = nullptr>
constexpr auto stan::math::promote_scalar (UnPromotedType &&x) noexcept
 No-op overload when promoting a type's scalar to the type it already has.
 
template<typename PromotionScalar , typename UnPromotedType , require_eigen_t< UnPromotedType > * = nullptr, require_not_same_t< PromotionScalar, value_type_t< UnPromotedType > > * = nullptr>
auto stan::math::promote_scalar (UnPromotedType &&x)
 Promote the scalar type of an eigen matrix to the requested type.
 
template<typename PromotionScalars , typename UnPromotedTypes , require_all_tuple_t< PromotionScalars, UnPromotedTypes > * = nullptr, require_not_same_t< PromotionScalars, UnPromotedTypes > * = nullptr>
constexpr promote_scalar_t< PromotionScalars, UnPromotedTypes > stan::math::promote_scalar (UnPromotedTypes &&x)
 Promote the scalar type of a tuples elements to the requested types.