1 #ifndef __STAN__MATH__MATRIX__VALIDATE_MATCHING_DIMS_HPP__
2 #define __STAN__MATH__MATRIX__VALIDATE_MATCHING_DIMS_HPP__
11 template <
typename T1,
int R1,
int C1,
typename T2,
int R2,
int C2>
13 const Eigen::Matrix<T2,R2,C2>& x2,
15 if (x1.rows() == x2.rows()
16 && x1.cols() == x2.cols())
return;
18 ss <<
"error in call to " << msg
19 <<
"; require matching dimensions, but found"
20 <<
" arg1(rows=" << x1.rows() <<
",cols=" << x1.cols() <<
");"
21 <<
" arg2(rows=" << x2.rows() <<
",cols=" << x2.cols() <<
")";
22 throw std::domain_error(ss.str());