[Rcpp-devel] [ANN] RcppParallel 4.3.15

JJ Allaire jj at rstudio.com
Wed Jan 20 13:50:10 CET 2016


RcppParallel v4.3.15 was recently released to CRAN. RcppParallel has
been on CRAN for a while but more recently added full support for
using Intel TBB (Thread Building Blocks) on both Windows and Solaris
x86. The package website is here:

http://rcppcore.github.io/RcppParallel/

A presentation Dirk and I prepared for the Workshop for Distributed
Computing in R is here (note that the provisos to TBB not working on
Windows or Solaris no longer apply!):

http://dirk.eddelbuettel.com/papers/rcpp_parallel_talk_jan2015.pdf

Note that there is some overlap between OpenMP and Intel TBB.
Advantages of Intel TBB over OpenMP are more flexibility/tunability
(at the cost of moderate additional complexity) as well as broader
platform support (works on Windows, OS X, Linux, and Solaris).

I think most Rcpp packages that implement custom algorithms could
benefit from the use of RcppParallel. Some important qualifiers
though:

1. If your Rcpp code makes substantial use of R math or other R
internal functions you might not see much benefit (as those functions
with rare exception need to be called from the main thread).

2. If you are already taking advantage of parallelism another way (e.g
RcppArmadillo may already be using multiple threads for many
operations via it's interface to the system BLAS/LAPACK) then you
might actually lose performance by layering more thread scheduling on
top of what you've already got.

RcppParallel currently only deals with thread parallelism, however
we're currently exploring adding Boost.SIMD to the package
(https://meetingcpp.com/tl_files/mcpp/slides/12/simd.pdf).

Finally, we have a number of articles on the RcppGallery which provide
example uses of RcppParallel, but they are (save for one) pretty
straightforward toy examples. If folks do find success with the
package we'd love to see a few more articles written about more
sophisticated use cases.

J.J.


More information about the Rcpp-devel mailing list