Skip to content

Commit 1a679cd

Browse files
committed
Use system TBB and remove the embedded code
Set TBB_LIBRARY_FILE environemnt variable to use Intel/OneAPI TBB: export TBB_LIBRARY_FILE=$TBBROOT/lib/$TBB_LIB_DIR/libtbb.so Modified from Debian patch by Andreas Tille <tille@debian.org>: https://salsa.debian.org/r-pkg-team/r-cran-rcppparallel/-/blob/master/debian/patches/use_debian_packaged_libtbb.patch
1 parent e5da96c commit 1a679cd

File tree

487 files changed

+7
-150160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

487 files changed

+7
-150160
lines changed

R/build.R

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,8 @@ tbbCxxFlags <- function() {
5353

5454
# Return the linker flags requried for TBB on this platform
5555
tbbLdFlags <- function() {
56-
# on Windows and Solaris we need to explicitly link against tbb.dll
57-
if ((Sys.info()['sysname'] %in% c("Windows", "SunOS")) && !isSparc()) {
58-
tbb <- tbbLibPath()
59-
paste("-L", asBuildPath(dirname(tbb)), " -ltbb -ltbbmalloc", sep = "")
60-
} else {
61-
""
62-
}
56+
tbb <- tbbLibPath()
57+
paste("-L", asBuildPath(dirname(tbb)), " -ltbb -ltbbmalloc", sep = "")
6358
}
6459

6560
# Determine the platform-specific path to the TBB library
@@ -71,15 +66,8 @@ tbbLibPath <- function(suffix = "") {
7166
"Windows" = paste("tbb", suffix, ".dll", sep = ""),
7267
"SunOS" = paste("libtbb", suffix, ".so", sep = "")
7368
)
74-
if ((sysname %in% names(tbbSupported)) && !isSparc()) {
75-
libDir <- "lib/"
76-
if (sysname == "Windows")
77-
libDir <- paste(libDir, .Platform$r_arch, "/", sep="")
78-
system.file(paste(libDir, tbbSupported[[sysname]], sep = ""),
79-
package = "RcppParallel")
80-
} else {
81-
NULL
82-
}
69+
70+
Sys.getenv("TBB_LIBRARY_FILE")
8371
}
8472

8573
isSparc <- function() {

inst/include/serial/tbb/parallel_for.h

Lines changed: 0 additions & 219 deletions
This file was deleted.

inst/include/serial/tbb/tbb_annotate.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)