[Rcpp-devel] C++11 in Windows R package

Matteo Fasiolo matteo.fasiolo at gmail.com
Thu Jun 12 00:29:40 CEST 2014


Hi Dirk,

 after realizing that the only C++11 feature I was using was <random> I
decided to switch
to boost::normal_distribution. In particular I now link to BH, but I don't
use the boost::normal_distribution
from there, but the one in this commit:

http://lists.boost.org/boost-commit/2012/10/43158.php

which is much faster than the current version. Hopefully the package will
now work on all platforms!

Thanks,

Matteo


On Mon, Jun 9, 2014 at 8:02 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 9 June 2014 at 17:45, Matteo Fasiolo wrote:
> | Hi Dirk
> |
> |
> |
> |     Saw that -- mvnfast looks quite interesting with OpenMP-based RNG!
> |     |
> |
> |
> | Yes, using a single header parallel RNG, which is compatible with C++11
> random
> | distributions made
> | all the work much easier! The C++11 part is creating lots of problems,
> though.
>
> I owe you a follow-up (maybe later today) about how/where it built for me
> with clang.  This seems to have to do with the 'C++' library one uses with
> clang/llvm; it seems on Debian it comes from g++-4.8 which works.
>
> Dirk
>
> |     Yes.  For the two (smaller) packages (RcppCNPy, and RcppBDT) where I
> use
> |     C++11 features I have
> |
> |           Depends: R (>= 3.1.0)
> |
> |     and you should too as C++11 does need R 3.1.0 or later.
> |
> |
> |
> |
> | Thanks, Prof. Ripley pointed at the same solution.
> |
> | Matteo
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140611/70d28d2d/attachment.html>


More information about the Rcpp-devel mailing list