<div dir="ltr"><div class="gmail_quote">> But your threads,<br>
> be it pthreads or C++11 threads are not calling the RNG supplied by R, are they?<br>
<br>That is correct. Just reading and writing to c++ vectors (with some non-R deterministic computations in-between)<br>
<br>Best,<br>
--<br>
Hao Ye<br>
<a href="mailto:hye@ucsd.edu">hye@ucsd.edu</a><br>
<br>
On Mar 11, 2014, at 1:15 PM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br>
<div class=""><br>
><br>
> On 11 March 2014 at 13:06, Hao Ye wrote:<br>
> | > Just accessing / setting data structures should work (but test first...),<br>
> | > RNGs is clearly asking for trouble.<br>
> |<br>
> | FWIW, I've been able to get this working using Rcpp and C++11 threads. (but using native C++ data structures, of course)<br>
><br>
</div>> Sure, just as there are CRAN packages doing OpenMP with RNGs.  But your threads,<br>
> be it pthreads or C++11 threads are not calling the RNG supplied by R, are they?<br>
><br>
> If so, I'd love to see an example / would invite you to post an Rcpp Gallery article.<br>
><br>
> Dirk<br>
<div class="HOEnZb"><div class="h5">><br>
> --<br>
> Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
<br>
</div></div></div><br></div>