1#ifndef STAN_MATH_PRIM_ERR_VALIDATE_NON_NEGATIVE_INDEX_HPP
2#define STAN_MATH_PRIM_ERR_VALIDATE_NON_NEGATIVE_INDEX_HPP
16 std::stringstream msg;
17 msg <<
"Found negative dimension size in variable declaration"
18 <<
"; variable=" << var_name <<
"; dimension size expression=" << expr
19 <<
"; expression value=" << val;
20 std::string msg_str(msg.str());
21 throw std::invalid_argument(msg_str.c_str());
void validate_non_negative_index(const char *var_name, const char *expr, int val)
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...