1 #ifndef STAN_MATH_PRIM_MAT_FUN_ADD_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_ADD_HPP 4 #include <boost/math/tools/promotion.hpp> 24 template <
typename T1,
typename T2,
int R,
int C>
25 inline Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R,
27 add(
const Eigen::Matrix<T1, R, C>& m1,
const Eigen::Matrix<T2, R, C>& m2) {
41 template <
typename T1,
typename T2,
int R,
int C>
42 inline Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R,
44 add(
const Eigen::Matrix<T1, R, C>& m,
const T2& c) {
57 template <
typename T1,
typename T2,
int R,
int C>
58 inline Eigen::Matrix<typename boost::math::tools::promote_args<T1, T2>::type, R,
60 add(
const T1& c,
const Eigen::Matrix<T2, R, C>& m) {
void check_matching_dims(const char *function, const char *name1, const matrix_cl &y1, const char *name2, const matrix_cl &y2)
Check if two matrix_cls have the same dimensions.
matrix_cl add(const matrix_cl &A, const matrix_cl &B)
Matrix addition on the OpenCL device.