RcppParallel provides a complete toolkit for creating safe, portable, high-performance parallel algorithms

August 31, 2016 Kevin Ushey

Modern computers and processors provide many advanced facilities for the concurrent, or parallel, execution of code. While R is a fundamentally a single-threaded program, it can call into multi-threading code, provided that such code interacts with R in a thread-safe manner. However, writing concurrent programs that run both safely and correctly is a very difficult task, and requires substantial expertise when working with the primitives provided by most programming languages or libraries.

RcppParallel provides a complete toolkit for creating safe, portable, high-performance parallel algorithms, built on top of the Intel “Threading Building Blocks” (TBB) and “TinyThread” libraries. In particular, RcppParallel provides two high-level operations — ‘parallelFor’, and ‘parallelReduce’, which provide a framework for the safe, performant implementation of many kinds of parallel algorithms. In this talk we’ll showcase how RcppParallel might be used to implement a parallel algorithm, and how the generated routine could be used in an R package.

Download Materials

About the Author

Kevin Ushey

Kevin is a software engineer at RStudio, and previously worked as as a statistical programmer at the rglab within the Fred Hutchinson Cancer Research Center. He ia a tool builder and enjoys developing computational tools that help researchers and scientists to achieve their analytic goals. Kevin completed an MSc in Statistics at the University of British Columbia, under the supervision of Jenny Bryan. His thesis involved the study of gene-gene and gene-Rx interaction effects, and statistical assessment of these epistatic effects in yeast growth curves

Follow on Twitter More Content by Kevin Ushey
Previous Video
Measure and report test coverage for R, C, C++ and Fortran code in R packages
Measure and report test coverage for R, C, C++ and Fortran code in R packages

measure and report test coverage for R, C, C++ and Fortran code in R packages

Next Video
How to profile and optimize code using profvis, a new package for exploring profiling data.
How to profile and optimize code using profvis, a new package for exploring profiling data.

How to profile and optimize code using profvis, a new package for exploring profiling data.

×

Please register to receive regular updates on our webinars.

!
Thank you!
Error - something went wrong!