1#ifndef STAN_MATH_PRIM_ERR_CHECK_POSITIVE_HPP
2#define STAN_MATH_PRIM_ERR_CHECK_POSITIVE_HPP
26template <
typename T_y>
43 const char* expr,
int size) {
46 std::stringstream msg;
47 msg <<
"; dimension size expression = " << expr;
48 std::string msg_str(msg.str());
50 "must have a positive size, but is ", msg_str.c_str());
int64_t size(const T &m)
Returns the size (number of the elements) of a matrix_cl or var_value<matrix_cl<T>>.
void elementwise_check(const F &is_good, const char *function, const char *name, const T &x, const char *must_be, const Indexings &... indexings)
Check that the predicate holds for the value of x.
void invalid_argument(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw an invalid_argument exception with a consistently formatted message.
void check_positive(const char *function, const char *name, const T_y &y)
Check if y is positive.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...