On 1 June 2013 at 14:05, Simon Zehnder wrote:
| On Jun 1, 2013, at 1:45 PM, Asis Hallab <[email protected]> wrote:
| > 1) Use private directive on all Rcpp-Objects that are only accessed to
| > be read from, and a shared statement on the Rcpp List that collects
| > the results. -> segfault
|
| First, you do usually not need a private clause on objects you read from, but
only objects you want to manipulate inside a thread.
| Second, I do not know how an Rcpp-List is embedded into memory, but it could
be, that dependent on this memory structure,
Collection ("list") objects which, in the case of vectors or matrices, are
contiguous memory. Ie a collection of R objects.
In short: better not to write there.
Good discussion otherwise.
My general recommendation: split the issues. Try to solve your OpenMP design
questions in a standalone C++ program without any R. If and when you're
happy (and this is no small task even for experienced C++ programmers) mix
with R(cpp).
Dirk
--
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel