[Rcpp-devel] Stack imbalance warning when using Rcpp and OpenMP

Davor Cubranic cubranic at stat.ubc.ca
Wed Jul 27 20:55:12 CEST 2011

On 2011-07-27, at 10:33 AM, Michael Braun wrote:

> I want to avoid making a copy of the entire list (my real-world application might have lots of different elements for each element of the "master" list).  But what works fine is if, within the loop, I do the Rcpp-to-double conversion, and then call a version of the function that takes a double as an argument, instead of the SEXP.  So I think there is something going on with passing the SEXP to func, and then using Rcpp::as to convert the SEXP to double.
> Is this close to what you are asking?

Yep. I'm still surprised that Rcpp:as works (I thought it would also take a SEXP as an argument), but if it works, then great.


More information about the Rcpp-devel mailing list