Skip to content

Commit

Permalink
Different poped differences based on rxode2 api
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Nov 4, 2024
1 parent ae998de commit 74ebf1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Imports:
methods,
qs,
rex,
rxode2 (> 3.0.2)
rxode2 (>= 3.0.2)
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
Expand Down
6 changes: 3 additions & 3 deletions src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
ARMA=`"$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e 'cat(file.path(find.package("RcppArmadillo"),"include"))'`
RCPP=`"$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e 'cat(file.path(find.package("Rcpp"),"include"))'`
EG=`"$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e 'cat(file.path(find.package("RcppEigen"),"include"))'`
RXAPI=`"$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e 'cat(length(rxode2::.rxode2ptrs()))'`

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
PKG_CXXFLAGS = -Id -@ISYSTEM@"$(EG)" -@ISYSTEM@"$(RCPP)" -@ISYSTEM@"$(ARMA)"
SHLIB_LDFLAGS = $(SHLIB_CXXLDFLAGS)
PKG_CXXFLAGS = -Id -@ISYSTEM@"$(EG)" -@ISYSTEM@"$(RCPP)" -@ISYSTEM@"$(ARMA)" -DRXAPI=$(RXAPI)
SHLIB_LDFLAGS = $(SHLIB_CXXLDFLAGS)
SHLIB_LD = $(SHLIB_CXXLD)

5 changes: 5 additions & 0 deletions src/poped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,13 @@ Rcpp::IntegerVector popedGetLoadedInfo() {
retN[6] = "stiff";
ret[6] = getOpStiff(op);

#if RXAPI > 48
retN[7] = "npars";
ret[7] = getRxNpars(rx);
#else
retN[7] = "npars";
ret[7] = NA_INTEGER;
#endif
ret.attr("names") = retN;
return ret;
}
Expand Down

0 comments on commit 74ebf1d

Please sign in to comment.