File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ 2018-02-26 Kevin Ushey <
[email protected] >
2+
3+ * src/api.cpp: Always set / put RNG state when calling Rcpp function
4+
5+
162018-02-25 Dirk Eddelbuettel <
[email protected] >
27
38 * vignettes/Rcpp.bib: Updated
Original file line number Diff line number Diff line change 66\section {Changes in Rcpp version 0.12.16 (2018 - 03 - xx )}{
77 \itemize {
88 \item Changes in Rcpp API :
9+ \itemize {
10+ \item Rcpp now sets and puts the RNG state upon each entry to an Rcpp
11+ function , ensuring that nested invocations of Rcpp functions manage the
12+ RNG state as expected
13+ }
914 \itemize {
1015 \item The \code {long long } type can now be used on 64 - bit Windows (Kevin
1116 in \ghpr {811 })
Original file line number Diff line number Diff line change @@ -70,15 +70,15 @@ namespace Rcpp {
7070
7171 // [[Rcpp::register]]
7272 unsigned long enterRNGScope () {
73- if (RNGScopeCounter == 0 ) GetRNGstate ();
73+ GetRNGstate ();
7474 RNGScopeCounter++;
7575 return RNGScopeCounter;
7676 }
7777
7878 // [[Rcpp::register]]
7979 unsigned long exitRNGScope () {
8080 RNGScopeCounter--;
81- if (RNGScopeCounter == 0 ) PutRNGstate ();
81+ PutRNGstate ();
8282 return RNGScopeCounter;
8383 }
8484
You can’t perform that action at this time.
0 commit comments