Dear all,
my package ast2ast includes currently some random number generation functions (e.g. R::dunif) within the C++ code.
So my question is whether the RNG functions in the namespace 'R' are thread safe?
Moreover, I would like to know how to handle the functions GetRNGstate() and PutRNGstate(). I guess that these functions modify a global variable. Thus, it is necessary to lock these functions with a mutex.
As a side note ast2ast translates R to C++ code. This code is thread safe in the sense that no static methods are implemented or that memory is associated with functions or global variables. Therefore, it would also be cool if the RNGs could abe used in parallel.
Thank you very much for your help. All the best, Konrad _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel