R: C++ Optimization flag when using the inline package -
in r when using cxxfunction inline package, how 1 alter optimization flag cpp compiler?
by default, on machine, compiles -g -o2
. utilize -o3
optimization gain speed. utilize rcpp
plugin if makes difference.
i have tried creating own plugin, , have tried set different arguments of cxxfunction nil worked.
i guess 1 alternative compile using r cmd shlib
instead of using cxxfunction
. rcpp recommends utilize of inline
because of test cases using it.
thanks help, allow me know if need clarification
there couple of options:
the best solution modify for usage r create e.g. file ~/.r/makevars
, set cflags, cxxflags, ... there. impact utilize r cmd install ...
, r cmd shlib ...
etc pp , cxxfunction()
inline uses it, works here too.
specific inline , rcpp: modify plugin, that's why plugin system. see rcpp:::rcpp.plugin.maker()
.
switch cxxfunction()
cfunction()
, hence not utilize plugin , set arguments manually.
needless say, alternative 1 , utilize myself.
edit: 4th (and rough !!) method used utilize in past edit $r_home/makeconf
and/or makeconf.site
.
c++ r inline rcpp
No comments:
Post a Comment