How to pass an array variable from R to C++ in a parallel Rcpp code in a thread safe way?

64 Views Asked by At

I would like to pass an array in a parallel code with RcppParallel.

First, I can pass an array with arma::cube. Is an arma::cube variable thread safe in a parallel code?

Second, to make a NumericVector thread safe, we can convert it to RcppParallel::RVector<double>. To make a NumericMatrix thread safe, we can convert it to RcppParallel::RMatrix<double>. Is there a RcppParallel::RArray<double> equivalent for an arma::cube or another type of variable?

I am expecting a simple yes/no answers or short examples.

0

There are 0 best solutions below