[Rcpp-devel] formals( C++Function )

2010-11-24 Thread Romain Francois
Hello, I've added some code that allows one to set the formals of a C++ function exposed through a module. For example: require( inline ) require( Rcpp ) fx <- cxxfunction(, "", includes = 'using namespace Rcpp ; double norm( double x, double y ){ return sqrt( x*x + y*y ) ; } RCPP_MOD

Re: [Rcpp-devel] Error with sugar dnorm;

2010-11-24 Thread Romain Francois
Le 24/11/10 19:38, Andrew Redd a écrit : I'm having a problem with sugar expressions that I can't figure out. I have these two functions that are sampling and prior functions for two different parameters of an MCMC model. BTW this is part of my big CUDA project, so I pass these as pointers into

[Rcpp-devel] Error with sugar dnorm;

2010-11-24 Thread Andrew Redd
I'm having a problem with sugar expressions that I can't figure out. I have these two functions that are sampling and prior functions for two different parameters of an MCMC model. BTW this is part of my big CUDA project, so I pass these as pointers into other functions. --- numeric rb1(numeric a,