From 35cb69bac9da6f3bbca5fb09e11b93cba4f1fd1a Mon Sep 17 00:00:00 2001 From: Peter Carbonetto Date: Wed, 31 May 2017 14:57:29 -0500 Subject: [PATCH] Added init.c containing code to register Rcpp routines. --- src/init.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/init.c diff --git a/src/init.c b/src/init.c new file mode 100644 index 0000000..4d1a18e --- /dev/null +++ b/src/init.c @@ -0,0 +1,24 @@ +#include +#include +#include +#include + +// Declarations for .Call entry points. +SEXP ashr_cxxMixSquarem (SEXP matrix_likSEXP, SEXP priorSEXP, + SEXP pi_initSEXP, SEXP controlSEXP); + +// See "Registering native routines" in "Writing R Extensions" manual +// for an explanation of what these lines of code do. +#define CALLDEF(name, n) {#name, (DL_FUNC) &name, n} + +const static R_CallMethodDef R_CallDef[] = { + CALLDEF(ashr_cxxMixSquarem,4), + {NULL, NULL, 0} +}; + +void attribute_visible R_init_varbvs(DllInfo *dll) +{ + R_registerRoutines(dll,NULL,R_CallDef,NULL,NULL); + R_useDynamicSymbols(dll,FALSE); + R_forceSymbols(dll,TRUE); +}