High level functions for parallel programming with Rcpp. The parallelFor() function can be used to convert the work of a standard serial “for” loop into a parallel one, and the parallelReduce() function can be used for accumulating aggregate or other values.
The high level interface enables safe and robust parallel programming without direct manipulation of operating system threads. On Windows, macOS, and Linux systems, the underlying implementation is based on Intel TBB (Threading Building Blocks). On other platforms, a less-performant fallback implementation based on the TinyThread library is used.
RcppParallel supports the new interface of Intel TBB, and can be configured to use an external copy of TBB (e.g., with oneTBB or the system TBB library), using the TBB_LIB and TBB_INC environment variables.
To build the development version of RcppParallel with oneTBB:
Note that you may replace TBB_VERSION=${TBB_TAG#?} with a custom version number if needed ( check available releases here ).
Set the TBB environment variables (specifically: TBB for the installation prefix, TBB_INC for the directory that includes the header files, and TBB_LIB for the libraries directory).
For example, installing oneTBB on Linux 64-bit (x86_64) to $HOME directory (change if needed!):
RcppParallel
High level functions for parallel programming with Rcpp. The
parallelFor()function can be used to convert the work of a standard serial “for” loop into a parallel one, and theparallelReduce()function can be used for accumulating aggregate or other values.The high level interface enables safe and robust parallel programming without direct manipulation of operating system threads. On Windows, macOS, and Linux systems, the underlying implementation is based on Intel TBB (Threading Building Blocks). On other platforms, a less-performant fallback implementation based on the TinyThread library is used.
For additional documentation on using RcppParallel see the package website at http://rcppcore.github.io/RcppParallel/.
Intel TBB
RcppParallelsupports the new interface of Intel TBB, and can be configured to use an external copy of TBB (e.g., withoneTBBor the system TBB library), using theTBB_LIBandTBB_INCenvironment variables.To build the development version of
RcppParallelwithoneTBB:oneTBB.For example, installing
oneTBBon Linux 64-bit (x86_64) to$HOMEdirectory (change if needed!):Note that you may replace
TBB_VERSION=${TBB_TAG#?}with a custom version number if needed ( check available releases here ).TBBfor the installation prefix,TBB_INCfor the directory that includes the header files, andTBB_LIBfor the libraries directory).For example, installing
oneTBBon Linux 64-bit (x86_64) to$HOMEdirectory (change if needed!):RcppParallel:License
The RcppParallel package is made available under the GPLv2 license.
The TinyThread library is licensed under the zlib/libpng license.
The Intel TBB Library is licensed under the Apache 2.0 license, as described at https://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt.