Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

flags

Compilation flags for RcppParallel


Description

Output the compiler or linker flags required to build against RcppParallel.

Usage

CxxFlags()

LdFlags()

RcppParallelLibs()

Details

These functions are typically called from Makevars as follows:

PKG_LIBS += $(shell "${R_HOME}/bin/Rscript" -e "RcppParallel::LdFlags()")

On Windows, the flags ensure that the package links with the built-in TBB library. On Linux and macOS, the output is empty, because TBB is loaded dynamically on load by RcppParallel.

R packages using RcppParallel should also add the following to their NAMESPACE file:

importFrom(RcppParallel, RcppParallelLibs)

This is necessary to ensure that RcppParallel (and so, TBB) is loaded and available.

Value

Returns NULL, invisibly. These functions are called for their side effects (writing the associated flags to stdout).


RcppParallel

Parallel Programming Tools for 'Rcpp'

v5.1.4
GPL (>= 2)
Authors
JJ Allaire [aut], Romain Francois [aut, cph], Kevin Ushey [aut, cre], Gregory Vandenbrouck [aut], Marcus Geelnard [aut, cph] (TinyThread library, https://tinythreadpp.bitsnbites.eu/), Hamada S. Badr [ctb] (<https://orcid.org/0000-0002-9808-2344>), RStudio [cph], Intel [aut, cph] (Intel TBB library, https://www.threadingbuildingblocks.org/), Microsoft [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.