Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

doubles are declared as NA_REAL #92

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* Added a evid suffix of 60 for cases where evid=2 adds an on event

* Initialize all variables to `NA`

# rxode2parse 2.0.18

* Removed linear compartment solutions with gradients from rxode2parse
Expand Down
8 changes: 4 additions & 4 deletions src/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static inline void printParamLags(char *buf, int *j) {
sAppendN(&sbOut, "#define last_", 13);
doDot(&sbOut, buf);
sAppend(&sbOut, "1(x) _getParCov(_cSub, _solveData, %d, (&_solveData->subjects[_cSub])->n_all_times - 1)\n", *j);

sAppendN(&sbOut, "#undef lead_", 12);
doDot(&sbOut, buf);
sAppendN(&sbOut, "1\n", 2);
Expand All @@ -169,14 +169,14 @@ static inline void printParamLags(char *buf, int *j) {

sAppendN(&sbOut, "#undef lag_", 11);
doDot(&sbOut, buf);
sAppendN(&sbOut, "1\n", 2);
sAppendN(&sbOut, "1\n", 2);
sAppendN(&sbOut, "#define lag_", 12);
doDot(&sbOut, buf);
sAppend(&sbOut, "1(x) _getParCov(_cSub, _solveData, %d, (&_solveData->subjects[_cSub])->idx - 1)\n", *j);

sAppendN(&sbOut, "#undef lag_", 11);
doDot(&sbOut, buf);
sAppendN(&sbOut, "\n", 1);
sAppendN(&sbOut, "\n", 1);
sAppendN(&sbOut, "#define lag_", 12);
doDot(&sbOut, buf);
sAppend(&sbOut, "(x,y) _getParCov(_cSub, _solveData, %d, (&_solveData->subjects[_cSub])->idx - (y))\n", *j);
Expand Down Expand Up @@ -219,7 +219,7 @@ static inline void printDoubleDeclaration(char *buf) {
!strcmp("rx_hi_", buf) || !strcmp("rx_low_", buf)){
sAppendN(&sbOut, "__", 2);
}
sAppendN(&sbOut, ";\n", 2);
sAppendN(&sbOut, " = NA_REAL;\n", 12);
}

static inline void printVoidDeclaration(char *buf) {
Expand Down
Loading