[Rcpp-devel] Inline (ghost from the devel still walks?)
Kaveh Vakili
Kaveh.Vakili at ulb.ac.be
Wed Oct 27 23:31:12 CEST 2010
Thanks again. One last question, i have some codes written last year by a colleague 'the other way' (in c++ using RInside) that i can partially use.
Can you make some (necessarily very general) comments on the performance gap between the two approaches (i.e. inline and RInside), all else equal.
In other words, inline seems more convenient/flexible than using Rinside. Does this convenience comes with large costs ?
The HPC slides/FAQ do not seem to address this (maybe the difference is irrelevant).
>On 27 October 2010 at 22:24, Kaveh Vakili wrote:
>| In trying to educated my self, i'm browsing through the abysses
>| of the codes with inline taggs in the ML.
>|
>| http://article.gmane.org/gmane.comp.lang.r.rcpp/611
>
>That is a very good idea, but you have to be careful about both the context and
>the time that the thread occurred. In this case, a lot of the addion of of
>the various d/p/q/r-functions for stats were added in response to this
>(great) thread started by Richard.
>
>As such, the namespace moved between the post and where it is now: just make
>it
>
> bpsum(r*lk*lk + i + j*lk) = sum(dbinom(cmin0, K[j], omega[r], false) *
> dpois(K[i]-cmin0, gamma[r], false));
>
>ie remove stats::. A simple quick check can be had by grep'ing in the
>unittest directory -- those 770+ tests pass for a given release.
>
>Dirk
>
>|
>| I tried to run fx5 (exactly as is shown there) but also any of the codes from the tread (fx2,...,) gives the same error message:
>|
>|
>| Error in compileCode(f, code, language = language, verbose = verbose) :
>| Compilation ERROR, function(s)/method(s) not created! file76d08651.cpp: In member function double Calculation::operator()(int, int) const:
>| file76d08651.cpp:26: error: dbinom is not a member of Rcpp::stats
>| file76d08651.cpp:26: error: dpois is not a member of Rcpp::stats
>| make: *** [file76d08651.o] Error 1
>|
>| [I'm running 0.8.7]
>|
>| I'm sure it's one of those beginner's mistake. Anyone cares to educate me on which one ?
>|
>| _______________________________________________
>| Rcpp-devel mailing list
>| Rcpp-devel at lists.r-forge.r-project.org
>| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
>--
>Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
>
More information about the Rcpp-devel
mailing list