aboutsummaryrefslogtreecommitdiff
path: root/R/mkinpredict.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2022-07-08 17:39:44 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2022-07-08 17:39:44 +0200
commitf35e0b3d3b9f41bee2f5cc357afcb69e3aadad15 (patch)
tree675d90c517a0e8a32c7c3af8ef631a5c588503d4 /R/mkinpredict.R
parent16a7ed9548b37fe3c68c993651226fdc2dda6402 (diff)
Store DLL info in mkinmod objects for performance
Thanks to Tomas Kalibera for his analysis of the problem on the r-package-devel mailing list and for the suggestion on how to fix it. See the current benchmark vignette for the new data on mkin 1.1.1 with R 4.2.1, with unprecedented performance.
Diffstat (limited to 'R/mkinpredict.R')
-rw-r--r--R/mkinpredict.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/mkinpredict.R b/R/mkinpredict.R
index 3402a7ba..9e6ba31f 100644
--- a/R/mkinpredict.R
+++ b/R/mkinpredict.R
@@ -177,7 +177,8 @@ mkinpredict.mkinmod <- function(x,
times = outtimes,
func = "diffs",
initfunc = "initpar",
- dllname = inline::getDynLib(x$cf)[["name"]],
+ dllname = if (is.null(x$dll_info)) inline::getDynLib(x$cf)[["name"]]
+ else x$dll_info[["name"]],
parms = odeparms[x$parms], # Order matters when using compiled models
method = method.ode,
atol = atol,

Contact - Imprint