[Rcpp-devel] Conversion of Rcpp::Vector Rcpp::List and Rcpp::Matrix to std objects - OpenMP

Asis Hallab asis.hallab at gmail.com
Fri May 31 18:00:30 CEST 2013

Dear Rcpp Experts,

in my current project I wanted to make use of OpenMP.
Unfortunately it seems Rcpp Objects cannot be used inside a block
executed in parallel.
Seg fault errors are the consequence, according to Dirk's reply in this thread

Hence the need to convert
Rcpp::Vector to std::vector,
Rcpp::Matrix to std::vector< std::vector >, and
Rcpp::List to std::map< std::string, … >

If I am not mistaken there's only support for the first conversion,
using the "as<> wrapper";
is this correct?
What would be the most efficient way of converting
Rcpp::Matrix and Rcpp::List to the above types?
And how to efficiently convert them back into Rcpp-Objects?

Kind regards and a nice weekend!

More information about the Rcpp-devel mailing list