Skip to content

Commit

Permalink
stan::math::size now instead of length
Browse files Browse the repository at this point in the history
  • Loading branch information
seantalts committed Jan 21, 2020
1 parent 652a543 commit d20f389
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/stan_math_backend/Expression_gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ let demangle_propto_name udf f =
let fn_renames =
List.map
~f:(fun (k, v) -> (Internal_fun.to_string k, v))
[ (Internal_fun.FnLength, "stan::size")
[ (Internal_fun.FnLength, "stan::math::size")
; (FnNegInf, "stan::math::negative_infinity")
; (FnResizeToMatch, "resize_to_match")
; (FnNaN, "std::numeric_limits<double>::quiet_NaN") ]
Expand Down
24 changes: 12 additions & 12 deletions test/integration/good/code-gen/cpp.expected
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ foo_1(const int& a, std::ostream* pstream__) {
int z;

current_statement__ = 312;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
std::vector<int> v;
current_statement__ = 312;
Expand All @@ -1446,7 +1446,7 @@ foo_1(const int& a, std::ostream* pstream__) {
break;
}}
current_statement__ = 315;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
std::vector<int> v;
current_statement__ = 315;
Expand All @@ -1457,14 +1457,14 @@ foo_1(const int& a, std::ostream* pstream__) {
continue;
}}
current_statement__ = 318;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
std::vector<int> v;
current_statement__ = 318;
assign(v, nil_index_list(), vs[(sym1__ - 1)],
"assigning variable v");
current_statement__ = 319;
for (size_t sym1__ = 1; sym1__ <= stan::size(v); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(v); ++sym1__) {
{
int vv;
current_statement__ = 319;
Expand Down Expand Up @@ -1504,7 +1504,7 @@ foo_1(const int& a, std::ostream* pstream__) {
for (size_t sym1__ = 1; sym1__ <= rows(vs); ++sym1__) {
current_statement__ = 327;
for (size_t sym2__ = 1;
sym2__ <= stan::size(
sym2__ <= stan::math::size(
rvalue(vs,
cons_list(index_uni(sym1__), nil_index_list()),
"vs")); ++sym2__) {
Expand All @@ -1522,7 +1522,7 @@ foo_1(const int& a, std::ostream* pstream__) {
for (size_t sym1__ = 1; sym1__ <= rows(vs); ++sym1__) {
current_statement__ = 330;
for (size_t sym2__ = 1;
sym2__ <= stan::size(
sym2__ <= stan::math::size(
rvalue(vs,
cons_list(index_uni(sym1__), nil_index_list()),
"vs")); ++sym2__) {
Expand Down Expand Up @@ -1555,7 +1555,7 @@ foo_1(const int& a, std::ostream* pstream__) {
std::numeric_limits<double>::quiet_NaN(), "assigning variable vs");
}
current_statement__ = 337;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
local_scalar_t__ v;
current_statement__ = 337;
Expand All @@ -1565,7 +1565,7 @@ foo_1(const int& a, std::ostream* pstream__) {
break;
}}
current_statement__ = 340;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
local_scalar_t__ v;
current_statement__ = 340;
Expand Down Expand Up @@ -1593,7 +1593,7 @@ foo_1(const int& a, std::ostream* pstream__) {
std::numeric_limits<double>::quiet_NaN(), "assigning variable vs");
}
current_statement__ = 347;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
local_scalar_t__ v;
current_statement__ = 347;
Expand All @@ -1603,7 +1603,7 @@ foo_1(const int& a, std::ostream* pstream__) {
break;
}}
current_statement__ = 350;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
local_scalar_t__ v;
current_statement__ = 350;
Expand Down Expand Up @@ -1660,7 +1660,7 @@ foo_2(const int& a, std::ostream* pstream__) {
int y;

current_statement__ = 367;
for (size_t sym1__ = 1; sym1__ <= stan::size(vs); ++sym1__) {
for (size_t sym1__ = 1; sym1__ <= stan::math::size(vs); ++sym1__) {
{
int v;
current_statement__ = 367;
Expand Down Expand Up @@ -3920,7 +3920,7 @@ class mother_model : public model_base_crtp<mother_model> {
std::numeric_limits<double>::quiet_NaN(),
"assigning variable blocked_tdata_vs");}
current_statement__ = 248;
for (size_t sym1__ = 1; sym1__ <= stan::size(blocked_tdata_vs);
for (size_t sym1__ = 1; sym1__ <= stan::math::size(blocked_tdata_vs);
++sym1__) {
{
double v;
Expand Down

0 comments on commit d20f389

Please sign in to comment.