From 062b9cc1d084e8bb5e552076fc48ade4b3050644 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Sat, 20 Jun 2015 01:06:24 +0200 Subject: Low-level generation of compiled models As it is unclear if and when ccSolve will be published on CRAN, the generation, compilation and use of the C version of the system of differential equations was developed for mkin, inspired and guided by the code from the ccSolve package. Many thanks again to Karline Soetaert for all of her work on this and other R packages. Now all model types, including the Hockey-Stick model for the parent compund and the IORE model for parent and/or metabolites can be compiled. --- vignettes/FOCUS_D.Rmd | 2 +- vignettes/compiled_models.Rmd | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'vignettes') diff --git a/vignettes/FOCUS_D.Rmd b/vignettes/FOCUS_D.Rmd index 902d3d24..8ae73c16 100644 --- a/vignettes/FOCUS_D.Rmd +++ b/vignettes/FOCUS_D.Rmd @@ -27,7 +27,7 @@ kinetics (SFO) to one metabolite named m1, which also degrades with SFO kinetics The call to mkinmod returns a degradation model. The differential equations represented in R code can be found in the character vector `$diffs` of the `mkinmod` object. If -the `ccSolve` package is installed and functional, the differential equation model +the gcc compiler is installed and functional, the differential equation model will be compiled from auto-generated C code. diff --git a/vignettes/compiled_models.Rmd b/vignettes/compiled_models.Rmd index bac284c5..5d83cf3a 100644 --- a/vignettes/compiled_models.Rmd +++ b/vignettes/compiled_models.Rmd @@ -15,16 +15,14 @@ output: ```{r, include = FALSE} library(knitr) opts_chunk$set(tidy = FALSE, cache = TRUE) -if (!require("ccSolve")) - message("Please install the ccSolve package for this vignette to produce sensible output") - ``` # Benchmark for a model that can also be solved with Eigenvalues This evaluation is taken from the example section of mkinfit. When using an mkin version -greater than 0.9-36 and the ccSolve package is installed and functional, you will get a -message that the model is being compiled when defining a model using mkinmod. +equal to or greater than 0.9-36 and a compiler (gcc) is installed, you will see +a message that the model is being compiled from autogenerated C code when +defining a model using mkinmod. ```{r create_SFO_SFO} library("mkin") @@ -83,5 +81,5 @@ smb.2["median"]/smb.2["deSolve, compiled", "median"] ``` -Here we get a performance benefit of more than a factor of 8 using the version -of the differential equation model compiled from C code using the ccSolve package! +Here we get a performance benefit of more than a factor of 10 using the version +of the differential equation model compiled from C code using the inline package! -- cgit v1.2.1