1#ifndef STAN_MATH_PRIM_FUN_MDIVIDE_LEFT_SPD_HPP
2#define STAN_MATH_PRIM_FUN_MDIVIDE_LEFT_SPD_HPP
25template <
typename EigMat1,
typename EigMat2,
26 require_all_eigen_t<EigMat1, EigMat2>* =
nullptr,
27 require_all_not_vt_var<EigMat1, EigMat2>* =
nullptr>
28inline Eigen::Matrix<return_type_t<EigMat1, EigMat2>,
29 EigMat1::RowsAtCompileTime, EigMat2::ColsAtCompileTime>
31 static constexpr const char* function =
"mdivide_left_spd";
33 const auto& A_ref =
to_ref(A);
41 = Eigen::Matrix<return_type_t<EigMat1, EigMat2>,
42 EigMat1::RowsAtCompileTime, EigMat1::ColsAtCompileTime>(
48 EigMat2::ColsAtCompileTime>(b));
void check_symmetric(const char *function, const char *name, const matrix_cl< T > &y)
Check if the matrix_cl is symmetric.
typename return_type< Ts... >::type return_type_t
Convenience type for the return type of the specified template parameters.
void check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Check if the matrices can be multiplied.
Eigen::Matrix< return_type_t< EigMat1, EigMat2 >, EigMat1::RowsAtCompileTime, EigMat2::ColsAtCompileTime > mdivide_left_spd(const EigMat1 &A, const EigMat2 &b)
Returns the solution of the system Ax=b where A is symmetric positive definite.
void check_pos_definite(const char *function, const char *name, const EigMat &y)
Check if the specified square, symmetric matrix is positive definite.
ref_type_t< T && > to_ref(T &&a)
This evaluates expensive Eigen expressions.
void check_not_nan(const char *function, const char *name, const T_y &y)
Check if y is not NaN.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...