Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

High-level functions for parallel programming with Rcpp

NotificationsYou must be signed in to change notification settings

RcppCore/RcppParallel

Repository files navigation

CRANR-CMD-check

High level functions for parallel programming with Rcpp. TheparallelFor() 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 onIntel TBB (Threading Building Blocks). On other platforms, a less-performant fallback implementation based on theTinyThread library is used.

For additional documentation on using RcppParallel see the package website athttp://rcppcore.github.io/RcppParallel/.

Intel TBB

RcppParallel supports the new interface of Intel TBB, and can be configured to use an external copy of TBB (e.g., withoneTBB or the system TBB library), using theTBB_LIB andTBB_INC environment variables.

To build the development version ofRcppParallel withoneTBB:

For example, installingoneTBB on Linux 64-bit (x86_64) to$HOME directory (change if needed!):

TBB_RELEASE="https://api.github.com/repos/oneapi-src/oneTBB/releases/latest"TBB_TAG=$(curl --silent$TBB_RELEASE| grep -Po'"tag_name": "\K.*?(?=")')TBB_VERSION=${TBB_TAG#?}wget https://github.com/oneapi-src/oneTBB/releases/download/v$TBB_VERSION/oneapi-tbb-$TBB_VERSION-lin.tgztar zxvf oneapi-tbb-$TBB_VERSION-lin.tgz -C$HOMEexport TBB="$HOME/oneapi-tbb-$TBB_VERSION"

Note that you may replaceTBB_VERSION=${TBB_TAG#?} with a custom version number if needed ( check available releaseshere ).

  • Set the TBB environment variables (specifically:TBB for the installation prefix,TBB_INC for the directory that includes the header files, andTBB_LIB for the libraries directory).

For example, installingoneTBB on Linux 64-bit (x86_64) to$HOME directory (change if needed!):

source$TBB/env/vars.sh intel64export TBB_INC="$TBB/include"export TBB_LIB="$TBB/lib/intel64/gcc4.8"
  • Build the development version ofRcppParallel:
install.packages("remotes")remotes::install_github("RcppCore/RcppParallel")

License

The RcppParallel package is made available under theGPLv2 license.

TheTinyThread library is licensed under thezlib/libpng license.

The Intel TBB Library is licensed under the Apache 2.0 license, as described athttps://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt.

About

High-level functions for parallel programming with Rcpp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors23


[8]ページ先頭

©2009-2025 Movatter.jp