Skip to content

Commit 2fe1ec0

Browse files
committed
update to oneTBB 2022.0
1 parent 69d50f6 commit 2fe1ec0

File tree

802 files changed

+57563
-168284
lines changed

Some content is hidden

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

802 files changed

+57563
-168284
lines changed

DESCRIPTION

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ Type: Package
33
Title: Parallel Programming Tools for 'Rcpp'
44
Version: 5.1.9.9000
55
Authors@R: c(
6+
person("Kevin", "Ushey", role = c("aut", "cre"), email = "kevin@rstudio.com"),
67
person("JJ", "Allaire", role = c("aut"), email = "jj@rstudio.com"),
78
person("Romain", "Francois", role = c("aut", "cph")),
8-
person("Kevin", "Ushey", role = c("aut", "cre"), email = "kevin@rstudio.com"),
99
person("Gregory", "Vandenbrouck", role = "aut"),
1010
person("Marcus", "Geelnard", role = c("aut", "cph"),
1111
comment = "TinyThread library, https://tinythreadpp.bitsnbites.eu/"),
1212
person("Hamada S.", "Badr",
1313
email = "badr@jhu.edu",
1414
role = c("ctb"),
1515
comment = c(ORCID = "0000-0002-9808-2344")),
16-
person(family = "Posit, PBC", role = "cph"),
17-
person(family = "Intel", role = c("aut", "cph"),
18-
comment = "Intel TBB library, https://www.threadingbuildingblocks.org/"),
19-
person(family = "Microsoft", role = "cph")
16+
person(family = "Intel", role = c("aut", "cph"), comment = "oneTBB library"),
17+
person(family = "UXL Foundation", role = c("aut", "cph"), comment = "oneTBB library"),
18+
person(family = "Microsoft", role = "cph"),
19+
person(family = "Posit, PBC", role = "cph")
2020
)
2121
Description: High level functions for parallel programming with 'Rcpp'.
2222
For example, the 'parallelFor()' function can be used to convert the work of
@@ -29,7 +29,7 @@ Suggests:
2929
knitr,
3030
rmarkdown
3131
Roxygen: list(markdown = TRUE)
32-
SystemRequirements: GNU make, Intel TBB, Windows: cmd.exe and cscript.exe, Solaris: g++ is required
32+
SystemRequirements: CMake (>= 3.5)
3333
License: GPL (>= 3)
3434
URL: https://rcppcore.github.io/RcppParallel/, https://github.com/RcppCore/RcppParallel
3535
BugReports: https://github.com/RcppCore/RcppParallel/issues

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
## RcppParallel 5.1.10 (UNRELEASED)
33

4+
* RcppParallel now bundles oneTBB 2022.0.0.
45

56
## RcppParallel 5.1.9
67

RcppParallel.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 233b2f71-c2b5-4961-81c5-36b8e5311a3a
23

34
RestoreWorkspace: No
45
SaveWorkspace: No

src/Makevars.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ else
160160
@echo "(tbb) Building TBB using bundled sources ..."
161161
@mkdir -p ../inst/include
162162
@cp -R tbb/include/* ../inst/include/
163-
@(cd tbb/src && $(MAKE_CMD) $(MAKE_ARGS) info)
164-
@(cd tbb/src && $(MAKE_CMD) $(MAKE_ARGS) $(MAKE_TARGETS) $(MAKE_LOG))
163+
@(cd tbb; mkdir -p build; cd build; cmake -DTBB_TEST=0 ..; cmake --build .; mkdir -p lib_release; cp -R *_relwithdebinfo/ lib_release/)
165164
endif
166165

167166
# NOTE: we do not want to clean ../inst/lib or ../inst/libs here,

src/install.libs.R.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040
tbbLibs <- list.files(
4141
path = "tbb/build/lib_release",
4242
pattern = shlibPattern,
43-
full.names = TRUE
43+
full.names = TRUE,
44+
recursive = TRUE
4445
)
4546

46-
# don't copy symlinks
47-
tbbLibs <- tbbLibs[!nzchar(Sys.readlink(tbbLibs))]
48-
49-
# perform the copy
50-
file.copy(tbbLibs, tbbDest)
47+
# perform the copy; use 'cp' so that we can preserve symlinks
48+
for (tbbLib in tbbLibs) {
49+
system2("cp", c("-P", shQuote(tbbLib), shQuote(tbbDest)))
50+
}
5151

5252
} else {
5353

src/tbb/.bazelrc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2021 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# DISCLAIMER: Bazel support is community-based. The maintainers do not
16+
# use Bazel internally. The Bazel build can have security risks or
17+
# optimization gaps.
18+
19+
build --symlink_prefix=/ # Out of source build

src/tbb/.bazelversion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.2.1

src/tbb/.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# -------- C++ --------
2+
# Prerequisites
3+
*.d
4+
5+
# Compiled Object files
6+
*.slo
7+
*.lo
8+
*.o
9+
*.obj
10+
11+
# Precompiled Headers
12+
*.gch
13+
*.pch
14+
15+
# Compiled Dynamic libraries
16+
*.so
17+
*.so.*
18+
*.dylib
19+
*.dll
20+
21+
# Fortran module files
22+
*.mod
23+
*.smod
24+
25+
# Compiled Static libraries
26+
*.lai
27+
*.la
28+
*.a
29+
*.lib
30+
31+
# Executables
32+
*.exe
33+
*.out
34+
*.app
35+
36+
# -------- CMake --------
37+
CMakeCache.txt
38+
CMakeFiles
39+
CMakeScripts
40+
Testing
41+
Makefile
42+
cmake_install.cmake
43+
install_manifest.txt
44+
compile_commands.json
45+
CTestTestfile.cmake
46+
build/*
47+
48+
# -------- Python --------
49+
__pycache__/
50+
*.py[cod]
51+
*$py.class
52+
53+
# -------- IDE --------
54+
.vscode/*
55+
.vs/*
56+
out/*
57+
CMakeSettings.json
58+
59+
# -------- CTags --------
60+
.tags
61+
.ctags
62+

src/tbb/BUILD.bazel

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
# Copyright (c) 2021-2024 Intel Corporation
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# DISCLAIMER: Bazel support is community-based. The maintainers do not
16+
# use Bazel internally. The Bazel build can have security risks or
17+
# optimization gaps.
18+
19+
package(
20+
default_visibility = ["//visibility:public"],
21+
)
22+
23+
cc_library(
24+
name = "tbb",
25+
srcs = glob([
26+
"src/tbb/*.cpp",
27+
"src/tbb/*.h",
28+
]) + select({
29+
"@platforms//cpu:x86_64": glob(["src/tbb/tools_api/**/*.h"]),
30+
"//conditions:default": [],
31+
}),
32+
hdrs = glob([
33+
"include/tbb/*.h",
34+
"include/oneapi/*.h",
35+
"include/oneapi/tbb/*.h",
36+
"include/oneapi/tbb/detail/*.h",
37+
]),
38+
copts = ["-w"] + select({
39+
"@platforms//os:windows": [""],
40+
"//conditions:default": ["-mwaitpkg"],
41+
}),
42+
defines =
43+
select({
44+
"@platforms//cpu:x86_64": ["__TBB_NO_IMPLICIT_LINKAGE"],
45+
"//conditions:default": [
46+
"USE_PTHREAD",
47+
],
48+
}) +
49+
select({
50+
"@platforms//os:osx": ["_XOPEN_SOURCE"],
51+
"//conditions:default": [],
52+
}),
53+
includes = [
54+
"include",
55+
],
56+
linkopts =
57+
select({
58+
"@platforms//os:windows": [],
59+
"@platforms//os:linux": [
60+
"-ldl",
61+
"-pthread",
62+
"-lrt",
63+
],
64+
"//conditions:default": ["-pthread"],
65+
}),
66+
local_defines = select({
67+
"@platforms//cpu:x86_64": [
68+
"__TBB_USE_ITT_NOTIFY",
69+
],
70+
"//conditions:default": [],
71+
}) + [
72+
"__TBB_BUILD",
73+
],
74+
textual_hdrs = select({
75+
"@platforms//cpu:x86_64": [
76+
"src/tbb/tools_api/ittnotify_static.c",
77+
],
78+
"//conditions:default": [],
79+
}),
80+
)
81+
82+
cc_library(
83+
name = "tbbmalloc",
84+
srcs =
85+
glob([
86+
"src/tbbmalloc/*.h",
87+
"src/tbb/*.h",
88+
"src/tbbmalloc_proxy/*.h",
89+
]) + [
90+
"src/tbbmalloc/backend.cpp",
91+
"src/tbbmalloc/backref.cpp",
92+
"src/tbbmalloc/frontend.cpp",
93+
"src/tbbmalloc/large_objects.cpp",
94+
"src/tbbmalloc/tbbmalloc.cpp",
95+
],
96+
hdrs = glob([
97+
"include/tbb/*.h",
98+
"include/oneapi/tbb/detail/*.h",
99+
"include/oneapi/tbb/*.h",
100+
]),
101+
includes = [
102+
"include",
103+
],
104+
local_defines = [
105+
"__TBBMALLOC_BUILD",
106+
],
107+
)
108+
109+
cc_library(
110+
name = "tbbmalloc_proxy",
111+
srcs = [
112+
"src/tbbmalloc_proxy/function_replacement.cpp",
113+
"src/tbbmalloc_proxy/proxy.cpp",
114+
],
115+
deps = [
116+
":tbbmalloc",
117+
],
118+
)
119+
120+
cc_test(
121+
name = "test_mutex",
122+
srcs = [
123+
"test/tbb/test_mutex.cpp",
124+
"test/tbb/test_mutex.h"
125+
] + glob([
126+
"test/common/*.h",
127+
]),
128+
includes = ["test"],
129+
deps = [
130+
":tbb",
131+
],
132+
)
133+
134+
cc_test(
135+
name = "test_parallel_for",
136+
srcs = [
137+
"test/tbb/test_parallel_for.cpp",
138+
"test/tbb/test_partitioner.h"
139+
] + glob([
140+
"test/common/*.h",
141+
]),
142+
includes = ["test"],
143+
deps = [
144+
":tbb",
145+
],
146+
)
147+
148+
cc_test(
149+
name = "test_parallel_reduce",
150+
srcs = [
151+
"test/tbb/test_parallel_reduce.cpp",
152+
] + glob([
153+
"test/common/*.h",
154+
]),
155+
includes = ["test"],
156+
deps = [
157+
":tbb",
158+
],
159+
)
160+
161+
cc_test(
162+
name = "test_task",
163+
srcs = [
164+
"test/tbb/test_task.cpp",
165+
] + glob([
166+
"test/common/*.h",
167+
]),
168+
includes = ["test"],
169+
deps = [
170+
":tbb",
171+
],
172+
)

0 commit comments

Comments
 (0)