Re: [Rcpp-devel] NA_REAL in RcppParallel

2016-06-02 Thread Jason Foster
Thank you, Bill and Dirk, for the suggestions and insight. Much appreciated. On Thu, Jun 2, 2016 at 12:03 PM, Dirk Eddelbuettel wrote: > > For the particular case of 'not finite' on floats I also found that I could > resort to the standard NaN which IEEE arithmetic supports. Of course, this > w

Re: [Rcpp-devel] NA_REAL in RcppParallel

2016-06-02 Thread Jason Foster
Great! Thank you, Hadley. On Jun 2, 2016 7:30 AM, "Hadley Wickham" wrote: > NA_REAL is just a NaN with a special value in the payload, so it's fine to > use. > Hadley > > On Thu, Jun 2, 2016 at 7:07 AM, Jason Foster > wrote: > > Hi, > > > > My

[Rcpp-devel] NA_REAL in RcppParallel

2016-06-02 Thread Jason Foster
Hi, My question is how can I return a thread safe NA_REAL using RcppParallel? I've read many posts about how it's not thread safe to call R or Rcpp APIs when using RcppParallel ( http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2016-January/009061.html), so in the past I've played it safe b