1 #ifndef STAN__MATH__ERROR_HANDLING__CHECK_CONSISTENT_SIZE_HPP
2 #define STAN__MATH__ERROR_HANDLING__CHECK_CONSISTENT_SIZE_HPP
12 template <
typename T,
typename T_result>
24 std::stringstream msg;
25 msg <<
" dimension=%1%, expecting dimension of either 1 or "
26 <<
"max_size=" << max_size
27 <<
"; a vectorized function was called with arguments of different "
28 <<
"scalar, array, vector, or matrix types, and they were not "
29 <<
"consistently sized; all arguments must be scalars or "
30 <<
"multidimensional values of the same shape.";
32 std::string tmp(msg.str());
34 return dom_err(
function,x_size,name,
bool dom_err(const char *function, const T &y, const char *name, const char *error_msg, const T_msg error_msg2, T_result *result)
bool check_consistent_size(size_t max_size, const char *function, const T &x, const char *name, T_result *result)
size_t size_of(const T &x)
size_t max_size(const T1 &x1, const T2 &x2)