[Pomp-commits] r1101 - pkg/pomp/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 26 10:43:11 CET 2015


Author: kingaa
Date: 2015-02-26 10:43:11 +0100 (Thu, 26 Feb 2015)
New Revision: 1101

Modified:
   pkg/pomp/R/builder.R
Log:
- rename functions in C files built by pompCBuilder

Modified: pkg/pomp/R/builder.R
===================================================================
--- pkg/pomp/R/builder.R	2015-02-26 09:43:09 UTC (rev 1100)
+++ pkg/pomp/R/builder.R	2015-02-26 09:43:11 UTC (rev 1101)
@@ -331,36 +331,36 @@
 header <- list(
                file="/* pomp model file: {%name%} */\n\n#include <{%pompheader%}>\n#include <R_ext/Rdynload.h>\n\n",
                registration="\nvoid R_init_{%name%} (DllInfo *info)\n{\n",
-               rmeasure="\nvoid {%name%}_rmeasure (double *__y, double *__x, double *__p, int *__obsindex, int *__stateindex, int *__parindex, int *__covindex, int __ncovars, double *__covars, double t)\n{\n",
-               dmeasure= "\nvoid {%name%}_dmeasure (double *__lik, double *__y, double *__x, double *__p, int give_log, int *__obsindex, int *__stateindex, int *__parindex, int *__covindex, int __ncovars, double *__covars, double t)\n{\n",
-               step.fn="\nvoid {%name%}_stepfn (double *__x, const double *__p, const int *__stateindex, const int *__parindex, const int *__covindex, int __covdim, const double *__covars, double t, double dt)\n{\n",
-               skeleton="\nvoid {%name%}_skelfn (double *__f, double *__x, double *__p, int *__stateindex, int *__parindex, int *__covindex, int __ncovars, double *__covars, double t)\n{\n",
-               parameter.transform="\nvoid {%name%}_par_trans (double *__pt, double *__p, int *__parindex)\n{\n",
-               parameter.inv.transform="\nvoid {%name%}_par_untrans (double *__pt, double *__p, int *__parindex)\n{\n",
-               rprior="\nvoid {%name%}_rprior (double *__p, int *__parindex)\n{\n",
-               dprior="\nvoid {%name%}_dprior (double *__lik, double *__p, int give_log, int *__parindex)\n{\n"
+               rmeasure="\nvoid __pomp_rmeasure (double *__y, double *__x, double *__p, int *__obsindex, int *__stateindex, int *__parindex, int *__covindex, int __ncovars, double *__covars, double t)\n{\n",
+               dmeasure= "\nvoid __pomp_dmeasure (double *__lik, double *__y, double *__x, double *__p, int give_log, int *__obsindex, int *__stateindex, int *__parindex, int *__covindex, int __ncovars, double *__covars, double t)\n{\n",
+               step.fn="\nvoid __pomp_stepfn (double *__x, const double *__p, const int *__stateindex, const int *__parindex, const int *__covindex, int __covdim, const double *__covars, double t, double dt)\n{\n",
+               skeleton="\nvoid __pomp_skelfn (double *__f, double *__x, double *__p, int *__stateindex, int *__parindex, int *__covindex, int __ncovars, double *__covars, double t)\n{\n",
+               parameter.transform="\nvoid __pomp_par_trans (double *__pt, double *__p, int *__parindex)\n{\n",
+               parameter.inv.transform="\nvoid __pomp_par_untrans (double *__pt, double *__p, int *__parindex)\n{\n",
+               rprior="\nvoid __pomp_rprior (double *__p, int *__parindex)\n{\n",
+               dprior="\nvoid __pomp_dprior (double *__lik, double *__p, int give_log, int *__parindex)\n{\n"
                )
 
 fnames <- list(
-               rmeasure="{%name%}_rmeasure",
-               dmeasure= "{%name%}_dmeasure",
-               step.fn="{%name%}_stepfn",
-               skeleton="{%name%}_skelfn",
-               parameter.transform="{%name%}_par_trans",
-               parameter.inv.transform="{%name%}_par_untrans",
-               rprior="{%name%}_rprior",
-               dprior="{%name%}_dprior"
+               rmeasure="__pomp_rmeasure",
+               dmeasure= "__pomp_dmeasure",
+               step.fn="__pomp_stepfn",
+               skeleton="__pomp_skelfn",
+               parameter.transform="__pomp_par_trans",
+               parameter.inv.transform="__pomp_par_untrans",
+               rprior="__pomp_rprior",
+               dprior="__pomp_dprior"
                )
 
 regist <- list(
-               rmeasure="R_RegisterCCallable(\"{%name%}\", \"{%name%}_rmeasure\", (DL_FUNC) {%name%}_rmeasure);\n",
-               dmeasure="R_RegisterCCallable(\"{%name%}\", \"{%name%}_dmeasure\", (DL_FUNC) {%name%}_dmeasure);\n",
-               step.fn="R_RegisterCCallable(\"{%name%}\", \"{%name%}_stepfn\", (DL_FUNC) {%name%}_stepfn);\n",
-               skeleton="R_RegisterCCallable(\"{%name%}\", \"{%name%}_skelfn\", (DL_FUNC) {%name%}_skelfn);\n",
-               parameter.transform="R_RegisterCCallable(\"{%name%}\", \"{%name%}_par_trans\", (DL_FUNC) {%name%}_par_trans);\n",
-               parameter.inv.transform="R_RegisterCCallable(\"{%name%}\", \"{%name%}_par_untrans\", (DL_FUNC) {%name%}_par_untrans);\n",
-               rprior="R_RegisterCCallable(\"{%name%}\", \"{%name%}_rprior\", (DL_FUNC) {%name%}_rprior);\n",
-               dprior="R_RegisterCCallable(\"{%name%}\", \"{%name%}_dprior\", (DL_FUNC) {%name%}_dprior);\n",
+               rmeasure="R_RegisterCCallable(\"{%name%}\", \"__pomp_rmeasure\", (DL_FUNC) __pomp_rmeasure);\n",
+               dmeasure="R_RegisterCCallable(\"{%name%}\", \"__pomp_dmeasure\", (DL_FUNC) __pomp_dmeasure);\n",
+               step.fn="R_RegisterCCallable(\"{%name%}\", \"__pomp_stepfn\", (DL_FUNC) __pomp_stepfn);\n",
+               skeleton="R_RegisterCCallable(\"{%name%}\", \"__pomp_skelfn\", (DL_FUNC) __pomp_skelfn);\n",
+               parameter.transform="R_RegisterCCallable(\"{%name%}\", \"__pomp_par_trans\", (DL_FUNC) __pomp_par_trans);\n",
+               parameter.inv.transform="R_RegisterCCallable(\"{%name%}\", \"__pomp_par_untrans\", (DL_FUNC) __pomp_par_untrans);\n",
+               rprior="R_RegisterCCallable(\"{%name%}\", \"__pomp_rprior\", (DL_FUNC) __pomp_rprior);\n",
+               dprior="R_RegisterCCallable(\"{%name%}\", \"__pomp_dprior\", (DL_FUNC) __pomp_dprior);\n",
                loadstack.incr="R_RegisterCCallable(\"{%name%}\", \"__pomp_load_stack_incr\", (DL_FUNC) __pomp_load_stack_incr);\n",
                loadstack.decr="R_RegisterCCallable(\"{%name%}\", \"__pomp_load_stack_decr\", (DL_FUNC) __pomp_load_stack_decr);\n"
                )



More information about the pomp-commits mailing list