I’ve been trying to reverse engineer stan_model() for my own purposes, and I have a few questions.
-
In the call to
cxxfunctionplus(), why is the signature argument blank? -
Does the plugin only handle compiler flags that it detects from the user’s machine?
-
The call to
cxxfunctionplus()takes a pretty crazyincludes=argument calledinc(which is constructed here). Constructing that arg calls toget_Rcpp_module_def_code(). That function looks like it’s writing an Rcpp module. Why do you need Rcpp modules if you’re using acxxfunction()wrapper? I always thought those were two competing ways to run compiled code from within R. -
In the call to
cxxfunctionplus(), why isbody = paste(" return Rcpp::wrap(\"", model_name, "\");", sep = '')Why is it so simple? -
Is 100% of the code being compiled just passed in through
includes=? -
Why does
cxxfunctionplus()take an argument calledmodule_name=? Its documentation says extra args are passed through to the plugin, but I don’t see the plugin handling that at all.