[Rcpp-devel] Rcpp + RInside: Passing a huge matrix from C++ to R

Todd Rudick todd at turbobyte.net
Fri Apr 15 22:39:05 CEST 2016


I've got an existing codebase that has its own huge matrix in shared memory
(an array of double, column-major), and for part of the computation I want
to pass it to R.

I've managed to get it working with RInside & Rcpp, but only by copying the
data into an Rcpp::NumericMatrix. My question is whether there's any way to
wrap the existing memory such that it's available read-only (enforced by R
or not). Even better if it's possible to do so with a subset of columns.

I was about to look at the bigmemory package for guidance but wanted to
check first to see if this isn't easy somehow.

thanks,
Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160415/4f9bd01c/attachment.html>


More information about the Rcpp-devel mailing list