Compare commits
907
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8301257efd | ||
|
|
583ff86379 | ||
|
|
b021a68cc9 | ||
|
|
e00c68dcac | ||
|
|
843162db8c | ||
|
|
4167f80a63 | ||
|
|
ba51d1c178 | ||
|
|
562f45baa5 | ||
|
|
09da692d7e | ||
|
|
b03a694ee0 | ||
|
|
a8216b9520 | ||
|
|
a88990d057 | ||
|
|
a8d9731c90 | ||
|
|
00eb0fe3a7 | ||
|
|
358d8e04e7 | ||
|
|
03bfb4eb11 | ||
|
|
88fbc345cb | ||
|
|
cef64f65e8 | ||
|
|
e349c15263 | ||
|
|
3cdc6f6558 | ||
|
|
fe43e53039 | ||
|
|
321475449d | ||
|
|
e5b7756973 | ||
|
|
dea347d9b5 | ||
|
|
f09e1fef1e | ||
|
|
7044849c44 | ||
|
|
8f7db26f42 | ||
|
|
b5b83e6e20 | ||
|
|
1bd6950cdc | ||
|
|
171e5ead91 | ||
|
|
fe9bfc5870 | ||
|
|
d9d0c41aac | ||
|
|
2fea40755c | ||
|
|
a736b40f52 | ||
|
|
75470994e8 | ||
|
|
7dcc00cebe | ||
|
|
1bf3c3a6a3 | ||
|
|
82bfdfe3a7 | ||
|
|
656f1f26e9 | ||
|
|
fc47943ae6 | ||
|
|
0e2d2c0bb9 | ||
|
|
b2e6335a2d | ||
|
|
d2addf4f7b | ||
|
|
65cd296b51 | ||
|
|
bce61b2c1a | ||
|
|
f48775ba44 | ||
|
|
628c90df68 | ||
|
|
285bb670a3 | ||
|
|
10f8b53684 | ||
|
|
b9a0766bfd | ||
|
|
0f4a5b1b67 | ||
|
|
43b4edece2 | ||
|
|
51c79a6b89 | ||
|
|
265b28bed6 | ||
|
|
ca41ba283c | ||
|
|
3436ab3944 | ||
|
|
5f3fb4ea38 | ||
|
|
caf48d533d | ||
|
|
e9af1a1b38 | ||
|
|
45291f4f66 | ||
|
|
2319e77c31 | ||
|
|
269d340d0d | ||
|
|
bdbec20606 | ||
|
|
821101aac9 | ||
|
|
41b2678845 | ||
|
|
1c0217d5e2 | ||
|
|
c1237e81ca | ||
|
|
febb98f3bc | ||
|
|
d901b250e1 | ||
|
|
26f1380e46 | ||
|
|
1d1541dff3 | ||
|
|
c2372fbbe6 | ||
|
|
63391bcc96 | ||
|
|
ab3ced8246 | ||
|
|
5ce6061afa | ||
|
|
a0633a3163 | ||
|
|
a3f1dc2171 | ||
|
|
22d6c1af11 | ||
|
|
2b7ddfc432 | ||
|
|
bc8b68d1c1 | ||
|
|
42f91b5673 | ||
|
|
82ac48556c | ||
|
|
8018524c10 | ||
|
|
7f508fa86e | ||
|
|
7bc8577403 | ||
|
|
57ad6817a0 | ||
|
|
9341ed953d | ||
|
|
3fed6d6de6 | ||
|
|
153feba356 | ||
|
|
114d96d0ea | ||
|
|
947a53893e | ||
|
|
0e9f1d0d09 | ||
|
|
fec5e0036b | ||
|
|
1ab634cee7 | ||
|
|
f918c9c99d | ||
|
|
e6107c9849 | ||
|
|
593857e7af | ||
|
|
038ae183c7 | ||
|
|
9bab6cca23 | ||
|
|
e4f282e141 | ||
|
|
f8f8f54b4c | ||
|
|
f50ec64e40 | ||
|
|
dcbaacbcff | ||
|
|
38d73c35d1 | ||
|
|
562746e49e | ||
|
|
430e2bcbc7 | ||
|
|
70c4e61e54 | ||
|
|
2f1446bf20 | ||
|
|
c0a57b9b06 | ||
|
|
3995f88b5a | ||
|
|
a946ef4152 | ||
|
|
49c45b1bcb | ||
|
|
846e077898 | ||
|
|
8af52d48ff | ||
|
|
d687233644 | ||
|
|
e049453269 | ||
|
|
fc210f475f | ||
|
|
0625bf7d60 | ||
|
|
8668efe5c2 | ||
|
|
5fde898d69 | ||
|
|
12fb2cc3b5 | ||
|
|
609af5daf4 | ||
|
|
2e80ac2890 | ||
|
|
84454799c3 | ||
|
|
d1ccf3207a | ||
|
|
9896332bc9 | ||
|
|
747b4100f8 | ||
|
|
0410223edd | ||
|
|
810afd06cd | ||
|
|
7af0e6a88c | ||
|
|
02465adc84 | ||
|
|
28f847d687 | ||
|
|
1e2c9b413d | ||
|
|
1364c776c7 | ||
|
|
9a47f6b30e | ||
|
|
482237977f | ||
|
|
d463050bf1 | ||
|
|
e0ddda3471 | ||
|
|
12e4f6b122 | ||
|
|
992784d786 | ||
|
|
516a17662b | ||
|
|
1b452c7011 | ||
|
|
b4fa6a641a | ||
|
|
feb041f752 | ||
|
|
007b7c3b90 | ||
|
|
777c2f0359 | ||
|
|
978febc1db | ||
|
|
cf201f4efa | ||
|
|
4b06283961 | ||
|
|
be2c0ab2ba | ||
|
|
e7e55adad8 | ||
|
|
1b7bef1a5e | ||
|
|
5f0125be6a | ||
|
|
29b4160dd1 | ||
|
|
1b28088c63 | ||
|
|
ae45b783c9 | ||
|
|
35dbb2d84f | ||
|
|
572b0224c9 | ||
|
|
51f22034ec | ||
|
|
1caa795811 | ||
|
|
3b8da48035 | ||
|
|
77f3a9e8fa | ||
|
|
5e572a146c | ||
|
|
7cd5abdaaf | ||
|
|
66fb804d7b | ||
|
|
5cb8edd561 | ||
|
|
d85ca32271 | ||
|
|
613c650547 | ||
|
|
7a99b62f8c | ||
|
|
a28ab310bb | ||
|
|
6a8f5e9cb0 | ||
|
|
8b48915475 | ||
|
|
439ab179d1 | ||
|
|
51d30cbe44 | ||
|
|
9bf145f56e | ||
|
|
606676b7ec | ||
|
|
9fbaa7d5ee | ||
|
|
e0e9baeccc | ||
|
|
490649535b | ||
|
|
0f5a4d15ee | ||
|
|
31c4d2524b | ||
|
|
4386f8d4bb | ||
|
|
f1043c27a9 | ||
|
|
987c503f39 | ||
|
|
cc1cac0b1c | ||
|
|
5c7ab0f677 | ||
|
|
9e937f144f | ||
|
|
4096b5af51 | ||
|
|
ae508fd264 | ||
|
|
f7013971d6 | ||
|
|
b6efa13c1c | ||
|
|
7d90f4bd35 | ||
|
|
26889f9d61 | ||
|
|
bdba7ddcf0 | ||
|
|
d1a6341203 | ||
|
|
5faa24e84b | ||
|
|
c9ac3d1c89 | ||
|
|
df1de71f25 | ||
|
|
1a89c385ae | ||
|
|
98f261fb7a | ||
|
|
dbd711db45 | ||
|
|
11ecbeccad | ||
|
|
1a9dcd8e7a | ||
|
|
9b7d6eded9 | ||
|
|
44cf932630 | ||
|
|
1f44f04e19 | ||
|
|
03348a07cb | ||
|
|
e909cb9683 | ||
|
|
ceaf406e16 | ||
|
|
041519e696 | ||
|
|
8e5dcb00f9 | ||
|
|
3965761081 | ||
|
|
95e6d62c1b | ||
|
|
5d4faa10d5 | ||
|
|
63a6013c67 | ||
|
|
cf7f965f80 | ||
|
|
1bf071d4ab | ||
|
|
3b8ac51dda | ||
|
|
fa1cab976f | ||
|
|
73ee170d77 | ||
|
|
34b3d4b73b | ||
|
|
88482f5f1a | ||
|
|
e020cf2e63 | ||
|
|
01badbebb0 | ||
|
|
2561dc7a3f | ||
|
|
1911b28398 | ||
|
|
e327de0d69 | ||
|
|
c593e32768 | ||
|
|
ef6f9b5ea5 | ||
|
|
5309534d7b | ||
|
|
cbc7a52b08 | ||
|
|
767bb681de | ||
|
|
5c785d7b00 | ||
|
|
1727c70c52 | ||
|
|
af05780cce | ||
|
|
5ee6eb9df6 | ||
|
|
e793c9ab10 | ||
|
|
9ebef4f972 | ||
|
|
b6ffd275a2 | ||
|
|
1368bbf89b | ||
|
|
fef013d2d4 | ||
|
|
eaa50b33d0 | ||
|
|
77972437ac | ||
|
|
3f66347ae1 | ||
|
|
a7ecf37807 | ||
|
|
40a0c423be | ||
|
|
3a41cfb933 | ||
|
|
104db7fba8 | ||
|
|
d38d12c81f | ||
|
|
fa3c37bf40 | ||
|
|
19f7d3331b | ||
|
|
fb390c56dd | ||
|
|
03c286d058 | ||
|
|
6f0ba27e6c | ||
|
|
0b30ba316c | ||
|
|
00711ab64a | ||
|
|
5991385163 | ||
|
|
747cab46cb | ||
|
|
f889fae4ad | ||
|
|
97f44bc428 | ||
|
|
746ec661c8 | ||
|
|
b56a6c71bc | ||
|
|
0bd0ae8d3d | ||
|
|
51aa602dfe | ||
|
|
463b603aef | ||
|
|
d4a1c23305 | ||
|
|
914f8cd7ae | ||
|
|
662602c648 | ||
|
|
06ef3676c8 | ||
|
|
729174d804 | ||
|
|
886a3ff7e5 | ||
|
|
96ba55042d | ||
|
|
e28b9506b6 | ||
|
|
492c01ee2b | ||
|
|
1009400588 | ||
|
|
f71cccc781 | ||
|
|
50fe7ef4bf | ||
|
|
f01f35d917 | ||
|
|
a5967f0fcf | ||
|
|
e13a512327 | ||
|
|
51dffe9487 | ||
|
|
e8aa5f1ee3 | ||
|
|
7cb69a7e1d | ||
|
|
a32d75796d | ||
|
|
3ebfedd863 | ||
|
|
2bb9ca5156 | ||
|
|
fa296991ef | ||
|
|
476a5a792b | ||
|
|
ba3c297a39 | ||
|
|
8b9ca4d80b | ||
|
|
8948cdb92d | ||
|
|
70b5bb9fae | ||
|
|
2c22d159f0 | ||
|
|
360e0178e7 | ||
|
|
05387d33d6 | ||
|
|
8eef2c6e4f | ||
|
|
dfcb16b10c | ||
|
|
0e7773e040 | ||
|
|
fa1f20e8a7 | ||
|
|
b37573f1e4 | ||
|
|
a225504b36 | ||
|
|
a337e29656 | ||
|
|
1c0db8271a | ||
|
|
0f28710440 | ||
|
|
f9955004ed | ||
|
|
ce30448720 | ||
|
|
4eebefbb68 | ||
|
|
09076c03ee | ||
|
|
db7891a246 | ||
|
|
52a7b37398 | ||
|
|
99d0c48180 | ||
|
|
1b3edbf85c | ||
|
|
b963626302 | ||
|
|
dd335b88a0 | ||
|
|
fb35d72cdd | ||
|
|
1114d23f45 | ||
|
|
0cd32ab10a | ||
|
|
f5d9aa92fa | ||
|
|
cfd170368e | ||
|
|
de0daa2b2f | ||
|
|
67cd2d0031 | ||
|
|
560ea5fd50 | ||
|
|
3b736d8964 | ||
|
|
4eea6498d1 | ||
|
|
0993eb2597 | ||
|
|
537a62c868 | ||
|
|
a4d9201841 | ||
|
|
83ffdf71d1 | ||
|
|
f07d4df23a | ||
|
|
d43b8c3243 | ||
|
|
ed1d7a7fbf | ||
|
|
6c1ea129c2 | ||
|
|
47d2b2c88b | ||
|
|
9aa510a4d3 | ||
|
|
110462de33 | ||
|
|
52323150cf | ||
|
|
589c986356 | ||
|
|
80b15efc67 | ||
|
|
4b123127e7 | ||
|
|
3df32aa46d | ||
|
|
981eb42aee | ||
|
|
6f468b0385 | ||
|
|
5ce1cc8c54 | ||
|
|
3bb1c639f1 | ||
|
|
63dc0389da | ||
|
|
39197401ee | ||
|
|
f42e37262b | ||
|
|
a17e0823ab | ||
|
|
91af3aea3a | ||
|
|
49b71fb80f | ||
|
|
9d68318891 | ||
|
|
7981bb4083 | ||
|
|
5154cf5f96 | ||
|
|
2a483d2314 | ||
|
|
33862d979c | ||
|
|
e574119686 | ||
|
|
aea8ce893c | ||
|
|
ee718990c2 | ||
|
|
b1d5aa29a4 | ||
|
|
132268ddd0 | ||
|
|
f309ff7cf3 | ||
|
|
d9cfc65f8d | ||
|
|
bd9dad9065 | ||
|
|
6575d93a46 | ||
|
|
0d0fe7cf14 | ||
|
|
712ad98443 | ||
|
|
f946f24cc4 | ||
|
|
575948b37c | ||
|
|
fcf40fc39f | ||
|
|
33da759dec | ||
|
|
c4f2d38b94 | ||
|
|
fa5dfe1738 | ||
|
|
681b96ecad | ||
|
|
4e4fffed4f | ||
|
|
a83797042a | ||
|
|
0bf0c9a853 | ||
|
|
7276846834 | ||
|
|
6b0cb2b88e | ||
|
|
4ba5c69de4 | ||
|
|
8652376147 | ||
|
|
9f3ae90ed2 | ||
|
|
af49577753 | ||
|
|
42381256ab | ||
|
|
42cafa567e | ||
|
|
45726ad1da | ||
|
|
0bab27645e | ||
|
|
ddd006ac0f | ||
|
|
792d312233 | ||
|
|
61352ca814 | ||
|
|
9a771aafb6 | ||
|
|
042c05859c | ||
|
|
78f8d9c982 | ||
|
|
65d46656f5 | ||
|
|
a22fa7afed | ||
|
|
e0376a760e | ||
|
|
8acdf22f9e | ||
|
|
e1f9047a83 | ||
|
|
4846d563d1 | ||
|
|
38d23f2394 | ||
|
|
ec7f5f3438 | ||
|
|
b6ac4d0e8a | ||
|
|
ed2b49da48 | ||
|
|
adb0a81b7f | ||
|
|
54f3611e12 | ||
|
|
bebc0cdbd2 | ||
|
|
10175ea047 | ||
|
|
0f6f87d1ad | ||
|
|
65f1633ff4 | ||
|
|
5fa5d2f19e | ||
|
|
2a766ddb13 | ||
|
|
051fd44c11 | ||
|
|
d304712beb | ||
|
|
e3ab04b078 | ||
|
|
326ab8f617 | ||
|
|
e60bce120d | ||
|
|
803ad72649 | ||
|
|
982d9cb27f | ||
|
|
38f44f2ca7 | ||
|
|
e1caa5f5a7 | ||
|
|
e0edf7a653 | ||
|
|
7dfe7e744a | ||
|
|
2df02d2ac7 | ||
|
|
61cfd830d4 | ||
|
|
c6c393777f | ||
|
|
a869ca2c33 | ||
|
|
e28b8840b3 | ||
|
|
dceb92191f | ||
|
|
b56dab688b | ||
|
|
dedade160c | ||
|
|
61fd1fdf23 | ||
|
|
08ab3e5c06 | ||
|
|
09b3703530 | ||
|
|
704ca611c4 | ||
|
|
8682bc9e66 | ||
|
|
3dfecb5d1a | ||
|
|
814986f20e | ||
|
|
45c247870f | ||
|
|
f528a583cb | ||
|
|
31275c3f3a | ||
|
|
a0be99678e | ||
|
|
e4fafed1cb | ||
|
|
0217e03ec1 | ||
|
|
0881802eeb | ||
|
|
f3883b3666 | ||
|
|
6c0fb2024a | ||
|
|
39d0606b03 | ||
|
|
621af05d94 | ||
|
|
34e7495b16 | ||
|
|
ed141f3130 | ||
|
|
280e32f887 | ||
|
|
7b10f20ab6 | ||
|
|
2b39fda900 | ||
|
|
e02bdf20e7 | ||
|
|
35b9fe6da9 | ||
|
|
6e78ddb76c | ||
|
|
d784b62819 | ||
|
|
196cbe5ae8 | ||
|
|
15b86bd1e2 | ||
|
|
a0007251a7 | ||
|
|
fa23dd3141 | ||
|
|
c71e06df83 | ||
|
|
2bfb15c32f | ||
|
|
b58a15d2a1 | ||
|
|
8475f7e187 | ||
|
|
af1a128a93 | ||
|
|
e49b67f757 | ||
|
|
9158f68080 | ||
|
|
aacabd0277 | ||
|
|
a44ca5a27e | ||
|
|
c712c1ad99 | ||
|
|
b21eebe723 | ||
|
|
d68d40b2e0 | ||
|
|
45c2298727 | ||
|
|
d3ad09cd7f | ||
|
|
b92627be07 | ||
|
|
fa5ed8e81c | ||
|
|
1684f054f6 | ||
|
|
79b5d689ec | ||
|
|
409280bae7 | ||
|
|
e653e16216 | ||
|
|
8a14e3cb89 | ||
|
|
c02c2d28da | ||
|
|
3c85ad7766 | ||
|
|
9d45787238 | ||
|
|
d4b5ee58cd | ||
|
|
a9fcf49775 | ||
|
|
0f287a7bc6 | ||
|
|
37f6cb92b7 | ||
|
|
0d73df4f49 | ||
|
|
8dea30c377 | ||
|
|
f8d1bf0362 | ||
|
|
e589dc0b50 | ||
|
|
d62834b13e | ||
|
|
acd1e736ed | ||
|
|
ba984824a2 | ||
|
|
f0985b145f | ||
|
|
b1c534bb9d | ||
|
|
edad47b823 | ||
|
|
ef539f9e24 | ||
|
|
8659619fbd | ||
|
|
503fdb2e31 | ||
|
|
d6c0dfa521 | ||
|
|
4719ac1d90 | ||
|
|
7a60b70036 | ||
|
|
77478a1fc3 | ||
|
|
dd27a25bdf | ||
|
|
9b843adfbb | ||
|
|
bd689b5a7e | ||
|
|
90b0f18297 | ||
|
|
db883d1d0f | ||
|
|
d3b0a80d02 | ||
|
|
0d377cc8ec | ||
|
|
bef1519a42 | ||
|
|
bd291eb0d1 | ||
|
|
0d545e2865 | ||
|
|
f5a5f79a33 | ||
|
|
d1d43adf6a | ||
|
|
ae2b801c3f | ||
|
|
eae64c1c41 | ||
|
|
9b5ca7493c | ||
|
|
3874ffd4fb | ||
|
|
afad98a166 | ||
|
|
22a5be7095 | ||
|
|
63a2a4dae3 | ||
|
|
73ccfb5ff3 | ||
|
|
9c9ace2686 | ||
|
|
bd15be276b | ||
|
|
86c06983bf | ||
|
|
948f0bbd4c | ||
|
|
377a91431e | ||
|
|
42b833fe80 | ||
|
|
94bee9c86b | ||
|
|
26d7f29349 | ||
|
|
9d85bf3b4e | ||
|
|
af8d95c5f7 | ||
|
|
2a7e0dbe46 | ||
|
|
4b02f628ae | ||
|
|
c881143c53 | ||
|
|
498a0c7e96 | ||
|
|
a9d98815ee | ||
|
|
6895c0defc | ||
|
|
6915673035 | ||
|
|
8152ba465a | ||
|
|
2d5b10f2d4 | ||
|
|
bca0235663 | ||
|
|
6f27d0dca6 | ||
|
|
fe3c895752 | ||
|
|
d666d342a6 | ||
|
|
7dd2b9cd1f | ||
|
|
95eae117bc | ||
|
|
374c27dca6 | ||
|
|
aae7fa62d1 | ||
|
|
5555985128 | ||
|
|
85a948b3f0 | ||
|
|
ad9e324a89 | ||
|
|
04be823227 | ||
|
|
e85d3705e7 | ||
|
|
2543c7fca5 | ||
|
|
2d516c871b | ||
|
|
7105e0a676 | ||
|
|
d405245230 | ||
|
|
182e8e70e2 | ||
|
|
3f810456b9 | ||
|
|
ce60d6b7f9 | ||
|
|
306c75f5e9 | ||
|
|
fa237b90ce | ||
|
|
4d0dc6a224 | ||
|
|
2360b48807 | ||
|
|
fd3960d311 | ||
|
|
89674dd32f | ||
|
|
87a922eaa8 | ||
|
|
95a749c59f | ||
|
|
a74fb75f43 | ||
|
|
1f52f5093e | ||
|
|
bad4c42be4 | ||
|
|
78d0290476 | ||
|
|
04fe9127cd | ||
|
|
cf9406ebe7 | ||
|
|
db334fc49b | ||
|
|
718aaf84f0 | ||
|
|
55bf2b3341 | ||
|
|
8a95c39c2a | ||
|
|
d6ade50c9b | ||
|
|
fc18ad2319 | ||
|
|
34108490bd | ||
|
|
ca7f580146 | ||
|
|
fdf1fdb57d | ||
|
|
882a6fe68c | ||
|
|
b57aab85b6 | ||
|
|
d8c53ce141 | ||
|
|
50d56cc679 | ||
|
|
471454d14c | ||
|
|
c4ec31c237 | ||
|
|
54353f7714 | ||
|
|
279d61ada1 | ||
|
|
2753b9a189 | ||
|
|
762b8af7e2 | ||
|
|
377e6c3b17 | ||
|
|
3cef80b261 | ||
|
|
2539ba6a67 | ||
|
|
0da79a8935 | ||
|
|
c1a0e74470 | ||
|
|
9951bf0db8 | ||
|
|
3420fb92c4 | ||
|
|
92c8529ff4 | ||
|
|
9501cd9dbd | ||
|
|
4f913ce690 | ||
|
|
791701a8c6 | ||
|
|
ad9d6e3edc | ||
|
|
39b4ff4adc | ||
|
|
a5c8624e96 | ||
|
|
483789879d | ||
|
|
1abf0cecbd | ||
|
|
548b88a09a | ||
|
|
0f2f3e5b69 | ||
|
|
bd0f1f9514 | ||
|
|
5155e9f78e | ||
|
|
4a87ca1cc5 | ||
|
|
26ee8abcc2 | ||
|
|
d9034a4e2e | ||
|
|
224eca369a | ||
|
|
84c859a5ea | ||
|
|
b26552d26e | ||
|
|
fd4d06d307 | ||
|
|
78d0318fc2 | ||
|
|
3210a79406 | ||
|
|
9e76c87c79 | ||
|
|
0d1787b991 | ||
|
|
5b10a8741c | ||
|
|
8b87444d2c | ||
|
|
df7306cb1e | ||
|
|
e2f1502126 | ||
|
|
9e401d119c | ||
|
|
244fba9d40 | ||
|
|
37d5a9fd49 | ||
|
|
f0d4aba544 | ||
|
|
ae0696c64f | ||
|
|
7340a88088 | ||
|
|
627cac6dd0 | ||
|
|
fabaaa6587 | ||
|
|
144b184667 | ||
|
|
54a22a627c | ||
|
|
4dfcb6d2e9 | ||
|
|
8c9814cfd4 | ||
|
|
c41d4782e4 | ||
|
|
3b9f9baef9 | ||
|
|
f4db1c8aba | ||
|
|
f6b7cb1b5f | ||
|
|
58653a3729 | ||
|
|
8259efb347 | ||
|
|
f4629cc848 | ||
|
|
a71747cd86 | ||
|
|
d1c04c902b | ||
|
|
f71c92ae4a | ||
|
|
de0a3a653b | ||
|
|
12ceae1213 | ||
|
|
c62b646850 | ||
|
|
ab7f370cd1 | ||
|
|
7b8018f0bc | ||
|
|
f27eb147f1 | ||
|
|
4bb8938d04 | ||
|
|
9f59fcf432 | ||
|
|
3cd37a22c7 | ||
|
|
d5a5a723ec | ||
|
|
d6b0e9d442 | ||
|
|
6ae3df4c8f | ||
|
|
bec5d998b1 | ||
|
|
ddfc32d926 | ||
|
|
8370742daa | ||
|
|
7b927dc4a8 | ||
|
|
fd1590c459 | ||
|
|
7eb68ae9d3 | ||
|
|
91ba7e7e19 | ||
|
|
11545bd606 | ||
|
|
a9d76a1721 | ||
|
|
e131071769 | ||
|
|
2a6bd1e198 | ||
|
|
546fe2736c | ||
|
|
229b63ee0a | ||
|
|
0b05d0f4ca | ||
|
|
35d2aedf98 | ||
|
|
cb6cc0ec55 | ||
|
|
d0748d299f | ||
|
|
261551ed82 | ||
|
|
48ba0d7acd | ||
|
|
7b022651e0 | ||
|
|
1ddebef8ac | ||
|
|
b2474bfc63 | ||
|
|
fa6605faf1 | ||
|
|
3f1ecfe509 | ||
|
|
d489c1f7a0 | ||
|
|
c4a799dff6 | ||
|
|
3b378356eb | ||
|
|
c79ef1e5f4 | ||
|
|
b40b034fa9 | ||
|
|
b9a0ab455c | ||
|
|
568a7e5822 | ||
|
|
706ad8677f | ||
|
|
71e1bb8efc | ||
|
|
5f1ae0dce3 | ||
|
|
7cee22511f | ||
|
|
4743eda21c | ||
|
|
83e480199d | ||
|
|
900b99bb43 | ||
|
|
926c3783a5 | ||
|
|
ddc3bd0392 | ||
|
|
20514c0eb8 | ||
|
|
4992457dc2 | ||
|
|
691dd26b66 | ||
|
|
32d5ec1f02 | ||
|
|
25c399f4de | ||
|
|
f5fb3c9153 | ||
|
|
acc5bdfe1a | ||
|
|
f9fd1bee10 | ||
|
|
3e7d8e7f28 | ||
|
|
45a99b4218 | ||
|
|
539cbb3e67 | ||
|
|
7c79c824af | ||
|
|
aff58fee2c | ||
|
|
37a89d47f2 | ||
|
|
60a815be1d | ||
|
|
1db4972980 | ||
|
|
d2504bd30f | ||
|
|
188981fa71 | ||
|
|
013495cdd8 | ||
|
|
a20bacda01 | ||
|
|
88f73bbb48 | ||
|
|
faa41e328c | ||
|
|
3f76ae94d0 | ||
|
|
e813596ba3 | ||
|
|
87c2fdc129 | ||
|
|
dc883a59b3 | ||
|
|
7f0dc95ec5 | ||
|
|
10e75e446e | ||
|
|
89b2e0e316 | ||
|
|
c456844955 | ||
|
|
c7865c1be0 | ||
|
|
3f657a3438 | ||
|
|
f8f7f738f4 | ||
|
|
fc184738eb | ||
|
|
50a1320c74 | ||
|
|
e6684b220b | ||
|
|
26b4256790 | ||
|
|
3ca0656dda | ||
|
|
b74f657b48 | ||
|
|
ea4e6156a2 | ||
|
|
42bd067650 | ||
|
|
a6834cccb6 | ||
|
|
95f951176a | ||
|
|
3c162e4ed6 | ||
|
|
d238e987a5 | ||
|
|
b95e88f168 | ||
|
|
d91db363fe | ||
|
|
a088cfa04f | ||
|
|
9f4344b7e1 | ||
|
|
0a6d67cde1 | ||
|
|
155acce74e | ||
|
|
4bb2faa06e | ||
|
|
0416d88c18 | ||
|
|
9515f14f7d | ||
|
|
4cc1ccac6f | ||
|
|
303848e4aa | ||
|
|
509659102c | ||
|
|
f4082a4c20 | ||
|
|
84bf9d452b | ||
|
|
e8e550e84f | ||
|
|
04179683b6 | ||
|
|
cafca33508 | ||
|
|
fc06b29994 | ||
|
|
7196bb4fef | ||
|
|
d5225609e8 | ||
|
|
727601afc0 | ||
|
|
ce4c43b9f3 | ||
|
|
f55d4e09b6 | ||
|
|
269d1c3e0c | ||
|
|
10a6d95e3b | ||
|
|
b7e669fdf8 | ||
|
|
9e62b0473a | ||
|
|
ecac5c6017 | ||
|
|
bb66e4a71c | ||
|
|
a96a032f2c | ||
|
|
5b2a49008c | ||
|
|
d5fd1e97a3 | ||
|
|
cba4dee4cd | ||
|
|
4379cf65fd | ||
|
|
2110128e4e | ||
|
|
13ccfff7c3 | ||
|
|
44505eb653 | ||
|
|
7eca30594f | ||
|
|
e5bfa25388 | ||
|
|
e1f0f36054 | ||
|
|
47059fdef5 | ||
|
|
298411ea82 | ||
|
|
47a2bcec75 | ||
|
|
a6a884ad0a | ||
|
|
17e5e694fe | ||
|
|
5ddf07d3b4 | ||
|
|
f91f55f25a | ||
|
|
518643f326 | ||
|
|
b860fefdfd | ||
|
|
16631b6b65 | ||
|
|
bb45f09201 | ||
|
|
cf95d2cce3 | ||
|
|
79b240c778 | ||
|
|
be844f72a7 | ||
|
|
4d74f22807 | ||
|
|
1425eec954 | ||
|
|
92f229a4fc | ||
|
|
b8e25ddbb5 | ||
|
|
0893628e3b | ||
|
|
d8604942dc | ||
|
|
fdaef045c8 | ||
|
|
325480e7bc | ||
|
|
154cc73ca4 | ||
|
|
06ee8580f0 | ||
|
|
89e920d4cc | ||
|
|
0e8ca5fc35 | ||
|
|
ff44bc8435 | ||
|
|
18815e1243 | ||
|
|
689cde15ac | ||
|
|
52cc85d009 | ||
|
|
0178faee56 | ||
|
|
c81d0a7b2d | ||
|
|
b9cbb9b93d | ||
|
|
be6f9ede7b | ||
|
|
2b8944b0b1 | ||
|
|
e2dca807a1 | ||
|
|
8f9ac0a8ad | ||
|
|
4aa700d360 | ||
|
|
a1d78351f0 | ||
|
|
9bd4d0650e | ||
|
|
eb69d23e73 | ||
|
|
421acb5d15 | ||
|
|
55cd6ea7fa | ||
|
|
d5a07be0a2 | ||
|
|
34da582c5f | ||
|
|
b2690018cc | ||
|
|
ff688c362e | ||
|
|
921c0359fe | ||
|
|
7023fe29d9 | ||
|
|
24a7a7eaa5 | ||
|
|
26fa943fed | ||
|
|
b65cc03428 | ||
|
|
84e80d3db0 | ||
|
|
a98798e9b1 | ||
|
|
7cf1c2f5fb | ||
|
|
bd9d8312cd | ||
|
|
2b1792db56 | ||
|
|
cab94b9c65 | ||
|
|
5ddef563b8 | ||
|
|
442ad60b78 | ||
|
|
e8386bdad1 | ||
|
|
f2ef7480b5 | ||
|
|
815e8f0a28 | ||
|
|
23266bc541 | ||
|
|
9acde48238 | ||
|
|
f1d1a24875 | ||
|
|
0cf592bd62 | ||
|
|
dda388c2f0 | ||
|
|
fa5280c06f | ||
|
|
3b161438c9 | ||
|
|
fc2d7f9124 | ||
|
|
9434ec94f6 | ||
|
|
bef111d02f | ||
|
|
c497ad8a76 | ||
|
|
2e9b2b180e | ||
|
|
989ede9661 | ||
|
|
752cde6f12 | ||
|
|
55b8e1b167 | ||
|
|
e6e493f96e | ||
|
|
f3303b1114 | ||
|
|
e6104c9599 | ||
|
|
2ecfcf5afc | ||
|
|
66c6d8e330 | ||
|
|
cd44d19898 | ||
|
|
fa4f581805 | ||
|
|
c7157ce332 | ||
|
|
d477500377 | ||
|
|
0e6d4699bb | ||
|
|
bc48c4a099 | ||
|
|
0f0d1cb994 | ||
|
|
274f68e529 | ||
|
|
17b7834b80 | ||
|
|
5e91b2c07d | ||
|
|
797dfaa7fc | ||
|
|
dece01699f | ||
|
|
f2e97f941e | ||
|
|
f2af74732b | ||
|
|
3fefeb64b3 | ||
|
|
4146a9e1f1 | ||
|
|
b14b68a522 | ||
|
|
3003ec0774 | ||
|
|
eac9465052 | ||
|
|
a45d68f28e | ||
|
|
137c1a88b6 | ||
|
|
ceacd2207e | ||
|
|
cb88c51c9c | ||
|
|
c14ecee586 | ||
|
|
d6f4c40e83 | ||
|
|
f343fbde09 | ||
|
|
2ac6c07be8 | ||
|
|
5ac88fef28 | ||
|
|
a791791b88 | ||
|
|
6ecebd90d9 | ||
|
|
39eeb13af4 | ||
|
|
0a09c4ff54 | ||
|
|
3f9baefb41 |
+1
-1
@@ -1 +1 @@
|
||||
5.0.0
|
||||
8.1.1
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Lines starting with '#' are comments.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# More details are here: https://help.github.com/articles/about-codeowners/
|
||||
|
||||
src/tbbmalloc @ldorau @lplewa @kfilipek
|
||||
src/tbbmalloc_proxy @ldorau @lplewa @kfilipek
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
name: Ask a question
|
||||
about: Use this template for any questions
|
||||
title: ''
|
||||
labels: 'question'
|
||||
assignees: ''
|
||||
---
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Report a bug or a performance issue
|
||||
about: Use this template to report unexpected behavior
|
||||
title: ''
|
||||
labels: 'bug'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
# Summary
|
||||
Provide a short summary of the issue.
|
||||
See the sections below
|
||||
for factors important for the reproduction of an issue.
|
||||
|
||||
# Version
|
||||
Report oneTBB version used to reproduce the problem.
|
||||
|
||||
# Environment
|
||||
Provide any environmental details that you consider significant for reproducing the issue.
|
||||
The following information is important:
|
||||
* Hardware
|
||||
* OS name and version
|
||||
* Compiler version
|
||||
|
||||
# Observed Behavior
|
||||
Document behavior you observe.
|
||||
|
||||
# Expected Behavior
|
||||
Document behavior you expect.
|
||||
|
||||
# Steps To Reproduce
|
||||
Check that the issue is reproducible with the latest revision
|
||||
of the master branch. Include all the steps to reproduce the issue.
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Request a feature
|
||||
about: Use this template to request new functionality or change the behavior of the library
|
||||
title: ''
|
||||
labels: 'new feature'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
# Summary
|
||||
Include a short summary of the request.
|
||||
|
||||
See the sections below
|
||||
for factors important for a feature request.
|
||||
|
||||
# Problem Statement
|
||||
Describe the problem you want to solve with a reasonable level of detail.
|
||||
|
||||
# Preferred Solution
|
||||
Provide your ideas regarding problem solutions.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Request a documentation change
|
||||
about: Use this template to report documentation issue or request documentation changes
|
||||
title: ''
|
||||
labels: 'documentation'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
# Summary
|
||||
Include a short summary of the issue or request.
|
||||
See the sections below
|
||||
for factors important for a documentation
|
||||
issue.
|
||||
|
||||
# URLs
|
||||
Include pointers to documents that are impacted.
|
||||
|
||||
# Additional Details
|
||||
Provide a detailed description of the expected changes in documentation
|
||||
and suggestions you have.
|
||||
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
@@ -0,0 +1,27 @@
|
||||
# Copyright (c) 2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# PR template regexp's for issue labeler
|
||||
bug fix:
|
||||
- '\[(x|X)\]\sbug\sfix'
|
||||
enhancement:
|
||||
- '\[(x|X)\]\snew\sfeature'
|
||||
tests:
|
||||
- '\[(x|X)\]\stests'
|
||||
infrastructure:
|
||||
- '\[(x|X)\]\sinfrastructure'
|
||||
documentation:
|
||||
- '\[(x|X)\]\sdocumentation'
|
||||
allocator:
|
||||
- '\[(x|X)\]\sallocator'
|
||||
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2023-2024 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
allocator:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['src/tbbmalloc/**/*', 'src/tbbmalloc_proxy/**/*', 'test/tbbmalloc/**/*']
|
||||
@@ -4,8 +4,6 @@ _Add a comprehensive description of proposed changes_
|
||||
|
||||
Fixes # - _issue number(s) if exists_
|
||||
|
||||
- [ ] - git commit message contains an appropriate signed-off-by string _(see [CONTRIBUTING.md](https://github.com/oneapi-src/oneTBB/blob/master/CONTRIBUTING.md#pull-requests) for details)_
|
||||
|
||||
### Type of change
|
||||
|
||||
_Choose one or multiple, leave empty if none of the other choices apply_
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2021 Intel Corporation
|
||||
# Copyright (c) 2021-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
SCAN_TARGET=$1
|
||||
|
||||
SKIP_PATTERN='*/.github/*'
|
||||
SKIP_PATTERN='*/.github/*,*/test/common/doctest.*'
|
||||
IGNORE_WORDS='parms,affinitized'
|
||||
|
||||
# Ignored cases
|
||||
IGNORE_COMMAND="sed -e /.*\\sOd\\s*=.*/d \
|
||||
@@ -34,6 +35,7 @@ IGNORE_COMMAND="sed -e /.*\\sOd\\s*=.*/d \
|
||||
-e /.*\\sFo\\s*=.*/d \
|
||||
-e /.*pipeline_filters.h.*nd\\s*=.*/d \
|
||||
-e /.*ittnotify.h.*unx\\s*=.*/d \
|
||||
-e /.*ittnotify.*.h.*hist\\s*=.*/d \
|
||||
-e /.*bzlib.cpp.*MSDOS\\s*=.*/d \
|
||||
-e /.*test_task.cpp.*tE\\s*=.*/d \
|
||||
-e /.*backend.cpp.*resSize\\s*=.*/d \
|
||||
@@ -49,9 +51,11 @@ IGNORE_COMMAND="sed -e /.*\\sOd\\s*=.*/d \
|
||||
-e /.*count_strings.cpp.*ths\\s*=.*/d \
|
||||
-e /.*polygon_overlay\/README.md.*ist\\s*=.*/d \
|
||||
-e /.*_pipeline_filters.h.*nd\\s*=.*/d \
|
||||
-e /.*sub_string_finder\/README.md.*ba\\s*=.*/d"
|
||||
-e /.*sub_string_finder\/README.md.*ba\\s*=.*/d
|
||||
-e /.*frontend.cpp.*SEH\\s*=.*/d
|
||||
-e /.*assert_impl.h.*statics\\s*=.*/d"
|
||||
|
||||
SCAN_RESULT=`codespell --quiet-level=2 --skip "${SKIP_PATTERN}" ${SCAN_TARGET}`
|
||||
SCAN_RESULT=`codespell --quiet-level=2 --skip "${SKIP_PATTERN}" -L "${IGNORE_WORDS}" ${SCAN_TARGET}`
|
||||
SCAN_RESULT=`echo -e "${SCAN_RESULT}" | ${IGNORE_COMMAND}`
|
||||
echo "${SCAN_RESULT}"
|
||||
|
||||
|
||||
+513
-66
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2021-2022 Intel Corporation
|
||||
# Copyright (c) 2021-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -25,76 +26,112 @@ on:
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
permissions: read-all
|
||||
|
||||
env:
|
||||
BUILD_CONCURRENCY: 2
|
||||
MACOS_BUILD_CONCURRENCY: 3
|
||||
TEST_TIMEOUT: 180
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ !contains(github.ref, 'refs/heads/master') }}
|
||||
|
||||
jobs:
|
||||
codespell:
|
||||
runs-on: [ubuntu-20.04]
|
||||
runs-on: [ubuntu-22.04]
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run scan
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
sudo apt update && sudo apt install -y codespell
|
||||
${GITHUB_WORKSPACE}/.github/scripts/codespell.sh `pwd`
|
||||
|
||||
examples_clang-format:
|
||||
runs-on: [ubuntu-20.04]
|
||||
runs-on: [ubuntu-22.04]
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run scan
|
||||
run: |
|
||||
command -v clang-format-10
|
||||
set -e -x -o pipefail
|
||||
command -v clang-format
|
||||
cp -r examples examples_formatted
|
||||
find examples_formatted -regex '.*\.\(cpp\|hpp\)' -exec clang-format-10 -style=file -i {} \;
|
||||
find examples_formatted -regex '.*\.\(cpp\|hpp\)' -exec clang-format -style=file -i {} \;
|
||||
diff -r examples examples_formatted
|
||||
|
||||
documentation:
|
||||
needs: [codespell]
|
||||
env:
|
||||
BUILD_TYPE: oss
|
||||
runs-on: [ubuntu-20.04]
|
||||
runs-on: [ubuntu-latest]
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
pip3 install -U Jinja2
|
||||
pip3 install git+https://github.com/executablebooks/sphinx-book-theme.git
|
||||
pip3 install sphinx_design
|
||||
echo GITHUB_SHA_SHORT=${GITHUB_SHA::8} >> $GITHUB_ENV
|
||||
mkdir html
|
||||
- name: Build documentation
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
export BUILD_TYPE=${BUILD_TYPE} && sphinx-build doc html
|
||||
tar -czvf html.tar.gz html/
|
||||
- name: Save docs
|
||||
uses: actions/upload-artifact@v2.2.1
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}
|
||||
path: html.tar.gz
|
||||
|
||||
pages:
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
needs: [documentation]
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout gh-pages
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: gh-pages
|
||||
- name: Set env
|
||||
run: echo GITHUB_SHA_SHORT=${GITHUB_SHA::8} >> $GITHUB_ENV
|
||||
- name: Download documetation
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: oneTBB-html-docs-${{ env.GITHUB_SHA_SHORT }}
|
||||
- name: Publish to github pages
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
tar -xvf html.tar.gz
|
||||
cd gh-pages
|
||||
rm -rf *
|
||||
@@ -108,97 +145,282 @@ jobs:
|
||||
|
||||
copyright_check:
|
||||
if: ${{ github.ref != 'refs/heads/master' }}
|
||||
runs-on: [ubuntu-20.04]
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0
|
||||
- name: Run check
|
||||
run: |
|
||||
sed -i \
|
||||
-e "/Copyright (c) .* Intel Corporation/s/ \([0-9]\+\)[-0-9]*/ \\1-$(date +%Y)/" \
|
||||
-e "/Copyright (c) .* Intel Corporation/s/$(date +%Y)-$(date +%Y)/$(date +%Y)/" \
|
||||
$(git diff --diff-filter=d --name-only ${{ github.event.pull_request.base.sha }})
|
||||
git checkout -- third-party-programs.txt
|
||||
git diff > years.diff
|
||||
if [[ -s years.diff ]]; then
|
||||
echo "Wrong copyright years"
|
||||
cat years.diff
|
||||
set -e -x -o pipefail
|
||||
base_sha=${{ github.event.pull_request.base.sha }}
|
||||
current_year=$(date +%Y)
|
||||
apache_copyright_line="Licensed under the Apache License"
|
||||
uxl_copyright_re="Copyright \(c\) [0-9]+ UXL Foundation Contributors"
|
||||
intel_copyright_re="Copyright.*[0-9]\{4\}.*Intel"
|
||||
check_failed=false
|
||||
|
||||
new_files=$(git diff --find-renames --diff-filter=A --name-only "$base_sha" || true)
|
||||
modified_files=$(git diff --find-renames --diff-filter=M --name-only "$base_sha" || true)
|
||||
|
||||
if [ -n "$new_files" ]; then
|
||||
new_with_apache=$(grep -lF "$apache_copyright_line" $new_files || true)
|
||||
for file in $new_with_apache; do
|
||||
uxl_match=$(grep -cE "$uxl_copyright_re" "$file" || true)
|
||||
if [ "$uxl_match" -eq 0 ]; then
|
||||
echo "ERROR: New file is missing UXL copyright: $file"
|
||||
check_failed=true
|
||||
else
|
||||
year_match=$(grep -cE "Copyright \(c\) ${current_year} UXL Foundation Contributors" "$file" || true)
|
||||
if [ "$year_match" -eq 0 ]; then
|
||||
echo "ERROR: New file must have current year (${current_year}) in UXL copyright: $file"
|
||||
check_failed=true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -n "$modified_files" ]; then
|
||||
modified_with_apache=$(grep -lF "$apache_copyright_line" $modified_files || true)
|
||||
for file in $modified_with_apache; do
|
||||
uxl_match=$(grep -cE "$uxl_copyright_re" "$file" || true)
|
||||
if [ "$uxl_match" -eq 0 ]; then
|
||||
echo "ERROR: Modified file is missing single year UXL copyright: $file"
|
||||
check_failed=true
|
||||
continue
|
||||
fi
|
||||
original_uxl=$(git show "${base_sha}:${file}" 2>/dev/null | grep -oE "$uxl_copyright_re" || true)
|
||||
current_uxl=$(grep -oE "$uxl_copyright_re" "$file" || true)
|
||||
if [ -n "$original_uxl" ] && [ "$original_uxl" != "$current_uxl" ]; then
|
||||
echo "ERROR: UXL copyright year must not be changed in: $file"
|
||||
check_failed=true
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
all_changed_files=$(git diff --find-renames --diff-filter=AM --name-only "$base_sha" || true)
|
||||
if [ -n "$all_changed_files" ]; then
|
||||
all_with_apache=$(grep -lF "$apache_copyright_line" $all_changed_files || true)
|
||||
for file in $all_with_apache; do
|
||||
original_intel=$(git show "${base_sha}:${file}" 2>/dev/null | grep "$intel_copyright_re" || true)
|
||||
current_intel=$(grep "$intel_copyright_re" "$file" || true)
|
||||
if [ -n "$original_intel" ] && [ "$original_intel" != "$current_intel" ]; then
|
||||
echo "ERROR: Intel copyright must not be modified in: $file"
|
||||
check_failed=true
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$check_failed" = true ]; then
|
||||
exit 1
|
||||
fi
|
||||
python_module_test_ubuntu18-04:
|
||||
runs-on: [ubuntu-18.04]
|
||||
python_module_test_ubuntu_latest:
|
||||
runs-on: [ubuntu-latest]
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run testing
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DTBB4PY_BUILD=ON -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc ..
|
||||
make VERBOSE=1 -j${BUILD_CONCURRENCY} python_build
|
||||
ctest -R python_test --output-on-failure --timeout ${TEST_TIMEOUT}
|
||||
|
||||
linux-testing:
|
||||
name: ${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}
|
||||
name: ${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}${{ matrix.cmake_static }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-18.04
|
||||
- os: ubuntu-latest
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 14
|
||||
build_type: relwithdebinfo
|
||||
preview: 'OFF'
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 17
|
||||
build_type: release
|
||||
preview: 'ON'
|
||||
- os: ubuntu-20.04
|
||||
c_compiler: gcc-10
|
||||
cxx_compiler: g++-10
|
||||
- os: ubuntu-24.04-arm
|
||||
c_compiler: gcc-14
|
||||
cxx_compiler: g++-14
|
||||
std: 20
|
||||
build_type: debug
|
||||
preview: 'ON'
|
||||
- os: ubuntu-24.04-arm
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 20
|
||||
build_type: release
|
||||
preview: 'ON'
|
||||
- os: ubuntu-22.04-arm
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 20
|
||||
build_type: release
|
||||
preview: 'ON'
|
||||
cmake_static: -DBUILD_SHARED_LIBS=OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y pkg-config libhwloc-dev hwloc
|
||||
- name: Run testing
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} ..
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_static }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_TEST_PREVIEW=${{ matrix.preview }} -DTCM_BUILD=OFF ..
|
||||
make VERBOSE=1 -j${BUILD_CONCURRENCY}
|
||||
ctest --timeout ${TEST_TIMEOUT} --output-on-failure
|
||||
|
||||
macos-testing:
|
||||
name: ${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}
|
||||
linux-tcm-testing:
|
||||
name: tcm_test_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-10.15
|
||||
- os: ubuntu-latest
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 20
|
||||
build_type: relwithdebinfo
|
||||
- os: ubuntu-24.04
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 17
|
||||
build_type: debug
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y pkg-config libhwloc-dev hwloc
|
||||
- name: Run testing
|
||||
shell: bash
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
|
||||
-DTCM_BUILD=ON -DTBB_BUILD=OFF ..
|
||||
make VERBOSE=1 -j${BUILD_CONCURRENCY}
|
||||
ctest --timeout ${TEST_TIMEOUT} --output-on-failure
|
||||
|
||||
linux-tcm-integration-testing:
|
||||
name: tcm_integration_test_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 45
|
||||
env:
|
||||
TCM_ENABLE: 1
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 23
|
||||
build_type: debug
|
||||
- os: ubuntu-24.04
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 20
|
||||
build_type: relwithdebinfo
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y pkg-config libhwloc-dev hwloc
|
||||
- name: Run testing
|
||||
shell: bash
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
|
||||
-DTCM_BUILD=ON -DTBB_TCM_TESTING=ON ..
|
||||
make VERBOSE=1 -j${BUILD_CONCURRENCY}
|
||||
ctest --timeout ${TEST_TIMEOUT} --output-on-failure
|
||||
|
||||
macos-testing:
|
||||
name: ${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}${{ matrix.cmake_static }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-15
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 17
|
||||
build_type: debug
|
||||
preview: 'ON'
|
||||
- os: macos-14
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 14
|
||||
build_type: relwithdebinfo
|
||||
preview: 'ON'
|
||||
- os: macos-15-intel
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 20
|
||||
build_type: release
|
||||
preview: 'ON'
|
||||
cmake_static: -DBUILD_SHARED_LIBS=OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run testing
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} ..
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_static }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_TEST_PREVIEW=${{ matrix.preview }} ..
|
||||
make VERBOSE=1 -j${MACOS_BUILD_CONCURRENCY}
|
||||
ctest --timeout ${TEST_TIMEOUT} --output-on-failure
|
||||
|
||||
@@ -210,14 +432,23 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
generator: Visual Studio 16 2019
|
||||
- os: windows-2025
|
||||
generator: Visual Studio 18 2026
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 14
|
||||
build_type: relwithdebinfo
|
||||
preview: 'ON'
|
||||
job_name: windows_cl2019_cxx14_relwithdebinfo_preview=ON
|
||||
job_name: windows_cl2026_cxx14_relwithdebinfo_preview=ON
|
||||
- os: windows-11-arm
|
||||
generator: Visual Studio 17 2022
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 20
|
||||
build_type: release
|
||||
preview: 'ON'
|
||||
job_name: windows_11_arm_cl2022_cxx20_release_preview=ON-DBUILD_SHARED_LIBS=OFF
|
||||
cmake_static: -DBUILD_SHARED_LIBS=OFF
|
||||
- os: windows-2022
|
||||
generator: Visual Studio 17 2022
|
||||
c_compiler: cl
|
||||
@@ -227,16 +458,132 @@ jobs:
|
||||
preview: 'OFF'
|
||||
job_name: windows_cl2022_cxx17_relwithdebinfo_preview=OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run testing
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ matrix.generator }}" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.std }} `
|
||||
cmake -G "${{ matrix.generator }}" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.std }} ${{ matrix.cmake_static }} `
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} `
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} ..
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_TEST_PREVIEW=${{ matrix.preview }} ..
|
||||
if (!$?) {
|
||||
throw "CMake configuration step failed, exit code $LastExitCode"
|
||||
}
|
||||
cmake --build . --config ${{ matrix.build_type }} -j -v
|
||||
if (!$?) {
|
||||
throw "CMake build step failed, exit code $LastExitCode"
|
||||
}
|
||||
ctest -C ${{ matrix.build_type }} --timeout ${env:TEST_TIMEOUT} --output-on-failure
|
||||
if (!$?) {
|
||||
throw "CTest failed, exit code $LastExitCode"
|
||||
}
|
||||
|
||||
windows-tcm-testing:
|
||||
name: tcm_test_${{ matrix.job_name }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2025
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 23
|
||||
build_type: debug
|
||||
job_name: windows_cl2026_cxx14_debug
|
||||
- os: windows-2022
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 17
|
||||
build_type: relwithdebinfo
|
||||
job_name: windows_cl2022_cxx17_relwithdebinfo
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
vcpkg install hwloc
|
||||
- name: Run testing
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
|
||||
-DCMAKE_CXX_STANDARD=${{ matrix.std }} `
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} `
|
||||
-DTCM_BUILD=ON -DTBB_BUILD=OFF `
|
||||
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ..
|
||||
if (!$?) {
|
||||
throw "CMake configuration step failed, exit code $LastExitCode"
|
||||
}
|
||||
cmake --build . --config ${{ matrix.build_type }} --parallel -v
|
||||
if (!$?) {
|
||||
throw "CMake build step failed, exit code $LastExitCode"
|
||||
}
|
||||
ctest -C ${{ matrix.build_type }} --timeout ${env:TEST_TIMEOUT} --output-on-failure
|
||||
if (!$?) {
|
||||
throw "CTest failed, exit code $LastExitCode"
|
||||
}
|
||||
|
||||
windows-tcm-integration_testing:
|
||||
name: tcm_integration_test_${{ matrix.job_name }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2025
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 20
|
||||
build_type: relwithdebinfo
|
||||
job_name: windows_cl2026_cxx14_relwithdebinfo
|
||||
- os: windows-2022
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 17
|
||||
build_type: debug
|
||||
job_name: windows_cl2022_cxx17_debug
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
vcpkg install hwloc
|
||||
- name: Run testing
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
|
||||
-DCMAKE_CXX_STANDARD=${{ matrix.std }} `
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} `
|
||||
-DTCM_BUILD=ON -DTBB_TCM_TESTING=ON `
|
||||
-DCMAKE_TOOLCHAIN_FILE="${env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ..
|
||||
if (!$?) {
|
||||
throw "CMake configuration step failed, exit code $LastExitCode"
|
||||
}
|
||||
cmake --build . --config ${{ matrix.build_type }} --parallel -v
|
||||
if (!$?) {
|
||||
throw "CMake build step failed, exit code $LastExitCode"
|
||||
}
|
||||
ctest -C ${{ matrix.build_type }} --timeout ${env:TEST_TIMEOUT} --output-on-failure
|
||||
if (!$?) {
|
||||
throw "CTest failed, exit code $LastExitCode"
|
||||
}
|
||||
|
||||
linux-examples-testing:
|
||||
name: examples_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_preview=${{ matrix.preview }}
|
||||
@@ -246,34 +593,39 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-18.04
|
||||
- os: ubuntu-latest
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 14
|
||||
build_type: relwithdebinfo
|
||||
preview: 'OFF'
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 17
|
||||
build_type: release
|
||||
preview: 'ON'
|
||||
- os: ubuntu-20.04
|
||||
c_compiler: gcc-10
|
||||
cxx_compiler: g++-10
|
||||
- os: ubuntu-24.04
|
||||
c_compiler: gcc
|
||||
cxx_compiler: g++
|
||||
std: 20
|
||||
build_type: debug
|
||||
preview: 'ON'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run testing
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
|
||||
-DTBB_CPF=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..
|
||||
-DTBB_TEST_PREVIEW=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..
|
||||
cmake --build . -v --target light_test_examples
|
||||
|
||||
macos-examples-testing:
|
||||
@@ -284,22 +636,27 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: macos-10.15
|
||||
- os: macos-15
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
std: 14
|
||||
build_type: relwithdebinfo
|
||||
preview: 'ON'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run testing
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
|
||||
-DTBB_CPF=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..
|
||||
-DTBB_TEST_PREVIEW=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..
|
||||
cmake --build . -v --target light_test_examples
|
||||
|
||||
windows-examples-testing:
|
||||
@@ -310,14 +667,14 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2019
|
||||
generator: Visual Studio 16 2019
|
||||
- os: windows-11-arm
|
||||
generator: Visual Studio 17 2022
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 14
|
||||
build_type: relwithdebinfo
|
||||
preview: 'ON'
|
||||
job_name: examples_windows_cl2019_cxx14_relwithdebinfo_preview=ON
|
||||
job_name: examples_windows_11_arm_cl2022_cxx14_relwithdebinfo_preview=ON
|
||||
- os: windows-2022
|
||||
generator: Visual Studio 17 2022
|
||||
c_compiler: cl
|
||||
@@ -327,12 +684,102 @@ jobs:
|
||||
preview: 'OFF'
|
||||
job_name: examples_windows_cl2022_cxx17_relwithdebinfo_preview=OFF
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Run testing
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "${{ matrix.generator }}" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.std }} `
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} `
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_CPF=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DTBB_TEST_PREVIEW=${{ matrix.preview }} -DTBB_TEST=OFF -DTBB_EXAMPLES=ON ..
|
||||
if (!$?) {
|
||||
throw "CMake configuration step of examples failed, exit code $LastExitCode"
|
||||
}
|
||||
cmake --build . -v --target light_test_examples
|
||||
if (!$?) {
|
||||
throw "CMake build step of examples failed, exit code $LastExitCode"
|
||||
}
|
||||
|
||||
linux-doc-examples-testing:
|
||||
name: doc_examples_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_${{ matrix.cmake_extra }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
c_compiler: clang
|
||||
cxx_compiler: clang++
|
||||
generator: Ninja
|
||||
std: 20
|
||||
build_type: relwithdebinfo
|
||||
cmake_extra: -DTBB_TEST_CXX20_MODULES=ON
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y ninja-build
|
||||
if [[ "${{ matrix.cxx_compiler }}" == "clang++" ]]; then
|
||||
sudo apt-get install -y libomp-dev
|
||||
fi
|
||||
- name: Test doc examples
|
||||
run: |
|
||||
set -e -x -o pipefail
|
||||
mkdir build && cd build
|
||||
cmake -G "${{ matrix.generator }}" -DCMAKE_CXX_STANDARD=${{ matrix.std }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type}} \
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
|
||||
${{ matrix.cmake_extra }} -DTBB_TEST=OFF -DTBB_DOC_EXAMPLES=ON ..
|
||||
cmake --build . -v --parallel --target build-doc-examples
|
||||
ctest -C ${{ matrix.build_type }} --timeout ${env:TEST_TIMEOUT} --output-on-failure -L doc-examples
|
||||
|
||||
windows-doc-examples-testing:
|
||||
name: doc_examples_${{ matrix.os }}_${{ matrix.cxx_compiler }}_cxx${{ matrix.std }}_${{ matrix.build_type }}_${{ matrix.cmake_extra }}
|
||||
runs-on: ['${{ matrix.os }}']
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-2022
|
||||
generator: "Visual Studio 17 2022"
|
||||
c_compiler: cl
|
||||
cxx_compiler: cl
|
||||
std: 20
|
||||
build_type: relwithdebinfo
|
||||
cmake_extra: -DTBB_TEST_CXX20_MODULES=ON
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Test doc examples
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -G "${{ matrix.generator }}" -A x64 -DCMAKE_CXX_STANDARD=${{ matrix.std }} `
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type}} -DCMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} `
|
||||
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} ${{ matrix.cmake_extra }} -DTBB_TEST=OFF -DTBB_DOC_EXAMPLES=ON ..
|
||||
if (!$?) {
|
||||
throw "CMake configuration step of examples from documentation failed, exit code $LastExitCode"
|
||||
}
|
||||
cmake --build . --config ${{ matrix.build_type }} -v --parallel --target build-doc-examples
|
||||
if (!$?) {
|
||||
throw "CMake build step of examples from documentation failed, exit code $LastExitCode"
|
||||
}
|
||||
ctest -C ${{ matrix.build_type }} --timeout ${env:TEST_TIMEOUT} --output-on-failure -L doc-examples
|
||||
if (!$?) {
|
||||
throw "CTest of examples from documentation failed, exit code $LastExitCode"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# Copyright (c) 2024-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- 'src/**'
|
||||
- 'include/**'
|
||||
- 'test/**'
|
||||
- 'python/**'
|
||||
- '.github/workflows/codeql.yml'
|
||||
schedule:
|
||||
- cron: '0 0 * * 1'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
runs-on: ubuntu-latest
|
||||
# timeout-minutes:
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ["cpp", "python"]
|
||||
|
||||
steps:
|
||||
- name: Harden Runner
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# Command-line programs to run using the OS shell.
|
||||
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
#- if: matrix.build-mode == 'manual'
|
||||
# shell: bash
|
||||
# run: |
|
||||
# echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
# 'languages you are analyzing, replace this with the commands to build' \
|
||||
# 'your code, for example:'
|
||||
# echo ' make bootstrap'
|
||||
# echo ' make release'
|
||||
# exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -0,0 +1,102 @@
|
||||
# Copyright (c) 2024-2025 Intel Corporation
|
||||
# Copyright (c) 2025 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: Coverity Scan
|
||||
|
||||
on:
|
||||
|
||||
# Only run on push to master branch
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
env:
|
||||
BUILD_CONCURRENCY: 4
|
||||
COVERITY_PROJECT_LIN: oneapi-src%2FoneTBB
|
||||
COVERITY_PROJECT_WIN: uxlfoundation%2FoneTBB
|
||||
|
||||
jobs:
|
||||
coverity_linux:
|
||||
name: Coverity Linux
|
||||
if: github.repository == 'uxlfoundation/oneTBB'
|
||||
runs-on: [ubuntu-latest]
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Download Linux 64 Coverity Tool
|
||||
run: |
|
||||
curl https://scan.coverity.com/download/cxx/linux64 --output ${GITHUB_WORKSPACE}/cov-linux64-tool.tar.gz \
|
||||
--data "token=${{secrets.COVERITY_TOKEN}}&project=${{env.COVERITY_PROJECT_LIN}}"
|
||||
mkdir cov-linux64-tool
|
||||
tar -xzf cov-linux64-tool.tar.gz --strip 1 -C cov-linux64-tool
|
||||
- name: Build with cov-build
|
||||
run: |
|
||||
export PATH="${PWD}/cov-linux64-tool/bin:${PATH}"
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=relwithdebinfo \
|
||||
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DTBB_TEST_PREVIEW=ON ..
|
||||
cov-build --dir cov-int make VERBOSE=1 -j${{env.BUILD_CONCURRENCY}}
|
||||
- name: Archive Coverity build results
|
||||
run: |
|
||||
cd build
|
||||
tar -czvf cov-int.tgz cov-int
|
||||
- name: Submit Coverity results for analysis
|
||||
run: |
|
||||
cd build
|
||||
curl \
|
||||
--form token="${{ secrets.COVERITY_TOKEN }}" \
|
||||
--form email="${{ secrets.COVERITY_EMAIL }}" \
|
||||
--form file=@cov-int.tgz \
|
||||
--form version="${GITHUB_SHA}" \
|
||||
--form description="" \
|
||||
"https://scan.coverity.com/builds?project=${{env.COVERITY_PROJECT_LIN}}"
|
||||
coverity_windows:
|
||||
name: Coverity Windows
|
||||
if: github.repository == 'uxlfoundation/oneTBB'
|
||||
runs-on: [windows-latest]
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Download Windows 64 Coverity Tool
|
||||
run: |
|
||||
curl https://scan.coverity.com/download/cxx/win64 -o cov-win64-tool.zip -d "token=${{secrets.COVERITY_TOKEN_WIN}}&project=${{env.COVERITY_PROJECT_WIN}}"
|
||||
7z x cov-win64-tool.zip
|
||||
del cov-win64-tool.zip
|
||||
move cov-analysis-win64* cov-win64-tool
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
|
||||
- name: Build with cov-build
|
||||
shell: bash
|
||||
run: |
|
||||
export PATH="${PWD}/cov-win64-tool/bin:${PATH}"
|
||||
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=relwithdebinfo \
|
||||
-DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DTBB_TEST_PREVIEW=ON .
|
||||
cov-configure --msvc
|
||||
cov-build --dir cov-int msbuild.exe ALL_BUILD.vcxproj -m -v:n
|
||||
- name: Archive Coverity build results
|
||||
run: |
|
||||
7z a -r cov-int.zip cov-int
|
||||
- name: Submit Coverity results for analysis
|
||||
run: |
|
||||
curl --form token="${{ secrets.COVERITY_TOKEN_WIN }}" --form email="${{ secrets.COVERITY_EMAIL }}" --form file=@cov-int.zip --form version="${GITHUB_SHA}" --form description="" "https://scan.coverity.com/builds?project=${{env.COVERITY_PROJECT_WIN}}"
|
||||
@@ -0,0 +1,42 @@
|
||||
# Copyright (c) 2023-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: "Issue Labeler"
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited]
|
||||
pull_request:
|
||||
types: [opened, edited]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: github/issue-labeler@c1b0f9f52a63158c4adc09425e858e87b32e9685 # v3.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/issue_labeler.yml
|
||||
enable-versioned-regex: 0
|
||||
@@ -0,0 +1,36 @@
|
||||
# Copyright (c) 2023-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
name: "Pull Request Labeler"
|
||||
on:
|
||||
- pull_request_target
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: actions/labeler@bf12e9b00b37c5c0ca2b87b79b2daf7891dbda13 # v7.0.0
|
||||
with:
|
||||
configuration-path: .github/labeler.yml
|
||||
@@ -0,0 +1,89 @@
|
||||
# Copyright (c) 2024-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
name: OSSF Scorecard
|
||||
on:
|
||||
# For Branch-Protection check. Only the default branch is supported. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
|
||||
branch_protection_rule:
|
||||
# To guarantee Maintained check is occasionally updated. See
|
||||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
|
||||
schedule:
|
||||
- cron: '00 02 * * *'
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecard analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Needed to publish results and get a badge (see publish_results below).
|
||||
id-token: write
|
||||
# Uncomment the permissions below if installing in a private repository.
|
||||
# contents: read
|
||||
# actions: read
|
||||
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@05e31511f85b41b11d1cf0ef85d0992719546e2c # v2.21.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
|
||||
# - you want to enable the Branch-Protection check on a *public* repository, or
|
||||
# - you are installing Scorecard on a *private* repository
|
||||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
|
||||
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
|
||||
|
||||
# Public repositories:
|
||||
# - Publish results to OpenSSF REST API for easy access by consumers
|
||||
# - Allows the repository to include the Scorecard badge.
|
||||
# - See https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories:
|
||||
# - `publish_results` will always be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
#- name: "Upload artifact"
|
||||
# uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
|
||||
# with:
|
||||
# name: SARIF file
|
||||
# path: results.sarif
|
||||
# retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard (optional).
|
||||
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
|
||||
#- name: "Upload to code-scanning"
|
||||
# uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
|
||||
# with:
|
||||
# sarif_file: results.sarif
|
||||
+78
-7
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021-2022 Intel Corporation
|
||||
# Copyright (c) 2021-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -16,8 +16,21 @@
|
||||
# use Bazel internally. The Bazel build can have security risks or
|
||||
# optimization gaps.
|
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
||||
load("@rules_license//rules:license.bzl", "license")
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
default_applicable_licenses = [":license"],
|
||||
)
|
||||
|
||||
exports_files([
|
||||
"LICENSE",
|
||||
])
|
||||
|
||||
license(
|
||||
name = "license",
|
||||
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
|
||||
license_text = "LICENSE.txt",
|
||||
)
|
||||
|
||||
cc_library(
|
||||
@@ -36,8 +49,9 @@ cc_library(
|
||||
"include/oneapi/tbb/detail/*.h",
|
||||
]),
|
||||
copts = ["-w"] + select({
|
||||
"@bazel_tools//platforms:windows": [""],
|
||||
"//conditions:default": ["-mwaitpkg"],
|
||||
"@platforms//os:windows": [""],
|
||||
"@platforms//cpu:x86_64": ["-mwaitpkg"],
|
||||
"//conditions:default": [""],
|
||||
}),
|
||||
defines =
|
||||
select({
|
||||
@@ -47,7 +61,7 @@ cc_library(
|
||||
],
|
||||
}) +
|
||||
select({
|
||||
"@bazel_tools//platforms:osx": ["_XOPEN_SOURCE"],
|
||||
"@platforms//os:osx": ["_XOPEN_SOURCE"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
includes = [
|
||||
@@ -55,8 +69,8 @@ cc_library(
|
||||
],
|
||||
linkopts =
|
||||
select({
|
||||
"@bazel_tools//platforms:windows": [],
|
||||
"@bazel_tools//platforms:linux": [
|
||||
"@platforms//os:windows": [],
|
||||
"@platforms//os:linux": [
|
||||
"-ldl",
|
||||
"-pthread",
|
||||
"-lrt",
|
||||
@@ -77,6 +91,7 @@ cc_library(
|
||||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
@@ -104,6 +119,7 @@ cc_library(
|
||||
local_defines = [
|
||||
"__TBBMALLOC_BUILD",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
@@ -112,7 +128,62 @@ cc_library(
|
||||
"src/tbbmalloc_proxy/function_replacement.cpp",
|
||||
"src/tbbmalloc_proxy/proxy.cpp",
|
||||
],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":tbbmalloc",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "test_mutex",
|
||||
srcs = [
|
||||
"test/tbb/test_mutex.cpp",
|
||||
"test/tbb/test_mutex.h",
|
||||
] + glob([
|
||||
"test/common/*.h",
|
||||
]),
|
||||
includes = ["test"],
|
||||
deps = [
|
||||
":tbb",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "test_parallel_for",
|
||||
srcs = [
|
||||
"test/tbb/test_parallel_for.cpp",
|
||||
"test/tbb/test_partitioner.h",
|
||||
] + glob([
|
||||
"test/common/*.h",
|
||||
]),
|
||||
includes = ["test"],
|
||||
deps = [
|
||||
":tbb",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "test_parallel_reduce",
|
||||
srcs = [
|
||||
"test/tbb/test_parallel_reduce.cpp",
|
||||
] + glob([
|
||||
"test/common/*.h",
|
||||
]),
|
||||
includes = ["test"],
|
||||
deps = [
|
||||
":tbb",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "test_task",
|
||||
srcs = [
|
||||
"test/tbb/test_task.cpp",
|
||||
] + glob([
|
||||
"test/common/*.h",
|
||||
]),
|
||||
includes = ["test"],
|
||||
deps = [
|
||||
":tbb",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -19,6 +19,8 @@ The standard Bazel approach to handling third-party libraries is static linking.
|
||||
|
||||
## Using oneTBB as a dependency
|
||||
|
||||
### Traditional WORKSPACE approach
|
||||
|
||||
This example demonstrates how to use oneTBB as a dependency within a Bazel project.
|
||||
|
||||
The following file structure is assumed:
|
||||
@@ -33,12 +35,12 @@ example
|
||||
|
||||
_WORKSPACE.bazel_:
|
||||
```python
|
||||
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
load("@platforms//tools/build_defs/repo:git.bzl", "git_repository")
|
||||
|
||||
git_repository(
|
||||
name = "oneTBB",
|
||||
branch = "master",
|
||||
remote = "https://github.com/oneapi-src/oneTBB/",
|
||||
remote = "https://github.com/uxlfoundation/oneTBB/",
|
||||
)
|
||||
```
|
||||
|
||||
@@ -78,6 +80,16 @@ The expected output of this program is the current version of oneTBB.
|
||||
|
||||
Switch to the folder with the files created earlier and run the binary with `bazel run //:Demo`.
|
||||
|
||||
### Bzlmod
|
||||
|
||||
If you use Bzlmod, you can fetch oneTBB with the [Bazel Central Registry](https://registry.bazel.build/).
|
||||
|
||||
Add the following line to your `MODULE.bazel` file:
|
||||
|
||||
```bazel
|
||||
bazel_dep(name = "onetbb", version = "2021.13.0")
|
||||
```
|
||||
|
||||
## Build oneTBB using Bazel
|
||||
|
||||
Run ```bazel build //...``` in the oneTBB root directory.
|
||||
|
||||
+196
-63
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2020-2022 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -12,10 +13,23 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
# If the running version of CMake is older than 3.12, the extra ... dots will be seen as version component separators,
|
||||
# resulting in the ...<max> part being ignored and preserving the pre-3.12 behavior of basing policies on <min>.
|
||||
cmake_minimum_required(VERSION 3.5.0...3.31.3)
|
||||
|
||||
# Enable CMake policies
|
||||
|
||||
if (POLICY CMP0063)
|
||||
# The NEW behavior for this policy is to honor the visibility properties for all target types.
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0068)
|
||||
# RPATH settings do not affect install_name on macOS since CMake 3.9
|
||||
cmake_policy(SET CMP0068 NEW)
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0091)
|
||||
# The NEW behavior for this policy is to not place MSVC runtime library flags in the default
|
||||
# CMAKE_<LANG>_FLAGS_<CONFIG> cache entries and use CMAKE_MSVC_RUNTIME_LIBRARY abstraction instead.
|
||||
@@ -24,6 +38,11 @@ elseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
message(FATAL_ERROR "CMAKE_MSVC_RUNTIME_LIBRARY was defined while policy CMP0091 is not available. Use CMake 3.15 or newer.")
|
||||
endif()
|
||||
|
||||
if (POLICY CMP0148)
|
||||
# CMake 3.27: The FindPythonInterp and FindPythonLibs modules are removed
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
endif()
|
||||
|
||||
if (TBB_WINDOWS_DRIVER AND (NOT ("${CMAKE_MSVC_RUNTIME_LIBRARY}" STREQUAL MultiThreaded OR "${CMAKE_MSVC_RUNTIME_LIBRARY}" STREQUAL MultiThreadedDebug)))
|
||||
message(FATAL_ERROR "Enabled TBB_WINDOWS_DRIVER requires CMAKE_MSVC_RUNTIME_LIBRARY to be set to MultiThreaded or MultiThreadedDebug.")
|
||||
endif()
|
||||
@@ -38,19 +57,13 @@ if (APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Until CMake 3.4.0 FindThreads.cmake requires C language enabled.
|
||||
# Enable C language before CXX to avoid possible override of CMAKE_SIZEOF_VOID_P.
|
||||
if (CMAKE_VERSION VERSION_LESS 3.4)
|
||||
enable_language(C)
|
||||
endif()
|
||||
|
||||
file(READ include/oneapi/tbb/version.h _tbb_version_info)
|
||||
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_version_info}")
|
||||
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_version_info}")
|
||||
string(REGEX REPLACE ".*#define TBB_VERSION_PATCH ([0-9]+).*" "\\1" _tbb_ver_patch "${_tbb_version_info}")
|
||||
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_version_info}")
|
||||
string(REGEX REPLACE ".*#define __TBB_BINARY_VERSION ([0-9]+).*" "\\1" TBB_BINARY_VERSION "${_tbb_version_info}")
|
||||
set(TBB_BINARY_MINOR_VERSION ${_tbb_ver_minor})
|
||||
string(REGEX REPLACE "..(..)." "\\1" TBB_BINARY_MINOR_VERSION "${TBB_INTERFACE_VERSION}")
|
||||
set(TBBMALLOC_BINARY_VERSION 2)
|
||||
set(TBBBIND_BINARY_VERSION 3)
|
||||
|
||||
@@ -85,6 +98,11 @@ endif()
|
||||
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++... instead of -std=gnu++...
|
||||
# ---------------------------------------------------------------------------------------------------------
|
||||
# Setup symbol visibility properties.
|
||||
|
||||
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
|
||||
set(CMAKE_CXX_VISIBILITY_PRESET "hidden")
|
||||
# ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
# Detect architecture (bitness).
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
@@ -102,17 +120,47 @@ option(TBB4PY_BUILD "Enable tbb4py build" OFF)
|
||||
option(TBB_BUILD "Enable tbb build" ON)
|
||||
option(TBBMALLOC_BUILD "Enable tbbmalloc build" ON)
|
||||
cmake_dependent_option(TBBMALLOC_PROXY_BUILD "Enable tbbmalloc_proxy build" ON "TBBMALLOC_BUILD" OFF)
|
||||
option(TBB_CPF "Enable preview features of the library" OFF)
|
||||
option(TBB_FIND_PACKAGE "Enable search for external oneTBB using find_package instead of build from sources" OFF)
|
||||
option(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH "Disable HWLOC automatic search by pkg-config tool" OFF)
|
||||
option(TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH "Disable HWLOC automatic search by pkg-config tool" ${CMAKE_CROSSCOMPILING})
|
||||
option(TBB_ENABLE_IPO "Enable Interprocedural Optimization (IPO) during the compilation" ON)
|
||||
option(TBB_CONTROL_FLOW_GUARD "Enable Control Flow Guard (CFG) during the compilation" OFF)
|
||||
option(TBB_FUZZ_TESTING "Enable fuzz testing" OFF)
|
||||
option(TBB_INSTALL "Enable installation" ON)
|
||||
option(TBB_FILE_TRIM "Enable __FILE__ trim" ON)
|
||||
if(LINUX)
|
||||
option(TBB_LINUX_SEPARATE_DBG "Enable separation of the debug symbols during the build" OFF)
|
||||
endif()
|
||||
if(APPLE)
|
||||
option(TBB_BUILD_APPLE_FRAMEWORKS "Build as Apple Frameworks" OFF)
|
||||
endif()
|
||||
if (TCM_BUILD)
|
||||
set(TCM_BUILD_OPTION_EXPLICITLY_SET TRUE)
|
||||
endif()
|
||||
option(TCM_BUILD "Enable Thread Composability Manager (TCM) build" ON)
|
||||
|
||||
if (WIN32)
|
||||
if (TBB_VERIFY_DEPENDENCY_SIGNATURE)
|
||||
message(STATUS "Dependency signature verification during dynamic linking in run-time is ENABLED.")
|
||||
elseif (NOT DEFINED TBB_VERIFY_DEPENDENCY_SIGNATURE)
|
||||
message(WARNING
|
||||
"Dependency signature verification during dynamic linking in run-time is disabled by "
|
||||
"default. This may lead to security vulnerabilities. See installation section in "
|
||||
"oneTBB documentation for more details.")
|
||||
else()
|
||||
message(STATUS "Dependency signature verification during dynamic linking in run-time is DISABLED")
|
||||
endif()
|
||||
option(TBB_VERIFY_DEPENDENCY_SIGNATURE
|
||||
"Verify signature of a dependency during its dynamic linking at run-time on Windows*" OFF)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
if(NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
message(WARNING "You are building oneTBB as a static library. This is highly discouraged and such configuration is not supported. Consider building a dynamic library to avoid unforeseen issues.")
|
||||
endif()
|
||||
|
||||
@@ -123,6 +171,14 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} _tbb_build_type)
|
||||
if (_tbb_build_type STREQUAL "debug")
|
||||
set(TBB_ENABLE_IPO OFF)
|
||||
endif()
|
||||
unset(_tbb_build_type)
|
||||
endif()
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Files and folders naming
|
||||
set(CMAKE_DEBUG_POSTFIX _debug)
|
||||
@@ -171,10 +227,22 @@ foreach(output_type LIBRARY ARCHIVE PDB RUNTIME)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
# We can't use generator expressions in a cmake variable name.
|
||||
set(TBB_TEST_WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${TBB_OUTPUT_DIR_BASE}_$<LOWER_CASE:$<CONFIG>>)
|
||||
else()
|
||||
set(TBB_TEST_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
endif()
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Common dependencies
|
||||
#force -pthread during compilation for Emscripten
|
||||
if (EMSCRIPTEN AND NOT EMSCRIPTEN_WITHOUT_PTHREAD)
|
||||
set(THREADS_HAVE_PTHREAD_ARG TRUE)
|
||||
endif()
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
|
||||
find_package(Threads REQUIRED)
|
||||
# -------------------------------------------------------------------
|
||||
@@ -184,20 +252,18 @@ foreach(FILE_WITH_EXTRA_TARGETS ${FILES_WITH_EXTRA_TARGETS})
|
||||
include(${FILE_WITH_EXTRA_TARGETS})
|
||||
endforeach()
|
||||
|
||||
# - Enabling LTO on Android causes the NDK bug.
|
||||
# NDK throws the warning: "argument unused during compilation: '-Wa,--noexecstack'"
|
||||
# - For some reason GCC does not instrument code with Thread Sanitizer when lto is enabled and C linker is used.
|
||||
if (TBB_ENABLE_IPO AND BUILD_SHARED_LIBS AND NOT ANDROID_PLATFORM AND NOT TBB_SANITIZE MATCHES "thread")
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.9)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT TBB_IPO_PROPERTY)
|
||||
if (TBB_FILE_TRIM)
|
||||
file(RELATIVE_PATH TBB_RELATIVE_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR})
|
||||
file(TO_NATIVE_PATH ${CMAKE_SOURCE_DIR} NATIVE_TBB_PROJECT_ROOT_DIR)
|
||||
if (TBB_RELATIVE_BIN_PATH)
|
||||
file(TO_NATIVE_PATH ${TBB_RELATIVE_BIN_PATH} NATIVE_TBB_RELATIVE_BIN_PATH)
|
||||
else()
|
||||
set(TBB_IPO_FLAGS TRUE)
|
||||
endif()
|
||||
if (TBB_IPO_PROPERTY OR TBB_IPO_FLAGS)
|
||||
message(STATUS "IPO enabled")
|
||||
file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} NATIVE_TBB_RELATIVE_BIN_PATH)
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (TBB_CONTROL_FLOW_GUARD)
|
||||
message(STATUS "Control Flow Guard (CFG) enabled")
|
||||
endif()
|
||||
|
||||
set(TBB_COMPILER_SETTINGS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/compilers/${CMAKE_CXX_COMPILER_ID}.cmake)
|
||||
@@ -207,7 +273,28 @@ else()
|
||||
message(WARNING "TBB compiler settings not found ${TBB_COMPILER_SETTINGS_FILE}")
|
||||
endif()
|
||||
|
||||
if (TBB_FIND_PACKAGE OR TBB_DIR)
|
||||
# - Enabling LTO on Android causes the NDK bug.
|
||||
# NDK throws the warning: "argument unused during compilation: '-Wa,--noexecstack'"
|
||||
# - For some reason GCC does not instrument code with Thread Sanitizer when lto is enabled and C linker is used.
|
||||
if (TBB_ENABLE_IPO AND BUILD_SHARED_LIBS AND NOT ANDROID_PLATFORM AND NOT TBB_SANITIZE MATCHES "thread")
|
||||
# For older cmake versions without CheckIPOSupported and when ipo detection is broken,
|
||||
# try to enable IPO unconditionally.
|
||||
if (CMAKE_VERSION VERSION_LESS 3.9 OR TBB_IPO_DETECTION_BROKEN)
|
||||
set(TBB_IPO_FLAGS TRUE)
|
||||
else()
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT TBB_IPO_PROPERTY)
|
||||
if (NOT TBB_IPO_PROPERTY)
|
||||
message(WARNING "IPO disabled: not supported by this compiler.")
|
||||
endif()
|
||||
endif()
|
||||
if (TBB_IPO_PROPERTY OR TBB_IPO_FLAGS)
|
||||
message(STATUS "IPO enabled")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TBB_FIND_PACKAGE AND TBB_DIR)
|
||||
# Allow specifying external TBB to test with.
|
||||
# Do not add main targets and installation instructions in that case.
|
||||
message(STATUS "Using external TBB for testing")
|
||||
@@ -216,51 +303,57 @@ else()
|
||||
if (TBB_BUILD)
|
||||
add_subdirectory(src/tbb)
|
||||
endif()
|
||||
if (NOT "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips")
|
||||
if (TBBMALLOC_BUILD)
|
||||
add_subdirectory(src/tbbmalloc)
|
||||
if(TBBMALLOC_PROXY_BUILD AND NOT "${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "ARM64")
|
||||
add_subdirectory(src/tbbmalloc_proxy)
|
||||
endif()
|
||||
endif()
|
||||
if (APPLE OR NOT BUILD_SHARED_LIBS)
|
||||
message(STATUS "TBBBind build targets are disabled due to unsupported environment")
|
||||
else()
|
||||
add_subdirectory(src/tbbbind)
|
||||
if (TBBMALLOC_BUILD)
|
||||
add_subdirectory(src/tbbmalloc)
|
||||
if(TBBMALLOC_PROXY_BUILD AND NOT "${MSVC_CXX_ARCHITECTURE_ID}" MATCHES "ARM64")
|
||||
add_subdirectory(src/tbbmalloc_proxy)
|
||||
endif()
|
||||
endif()
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
message(STATUS "TBBBind build targets are disabled due to unsupported environment")
|
||||
else()
|
||||
add_subdirectory(src/tbbbind)
|
||||
endif()
|
||||
if (TBB_INSTALL)
|
||||
# -------------------------------------------------------------------
|
||||
# Installation instructions
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# Installation instructions
|
||||
include(CMakePackageConfigHelpers)
|
||||
install(DIRECTORY include/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT devel)
|
||||
|
||||
install(DIRECTORY include/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT devel)
|
||||
install(EXPORT ${PROJECT_NAME}Targets
|
||||
NAMESPACE TBB::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
COMPONENT devel)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
||||
"include(\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake)\n")
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
||||
"include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n")
|
||||
endif()
|
||||
|
||||
install(EXPORT ${PROJECT_NAME}Targets
|
||||
NAMESPACE TBB::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
COMPONENT devel)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
|
||||
"include(\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake)\n")
|
||||
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
|
||||
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
COMPATIBILITY AnyNewerVersion)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
COMPONENT devel)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||||
COMPONENT devel)
|
||||
install(FILES "README.md"
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
COMPONENT devel)
|
||||
# -------------------------------------------------------------------
|
||||
endif()
|
||||
endif()
|
||||
|
||||
install(FILES "README.md"
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
COMPONENT devel)
|
||||
# -------------------------------------------------------------------
|
||||
if (TBB_TEST OR TCM_TEST)
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
if (TBB_TEST)
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
@@ -268,6 +361,18 @@ if (TBB_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
|
||||
|
||||
if (TBB_DOC_EXAMPLES)
|
||||
set(TBB_DOC_EXAMPLES_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/doc/main/examples_testing")
|
||||
if (NOT EXISTS ${TBB_DOC_EXAMPLES_DIRECTORY})
|
||||
message(FATAL_ERROR "Documentation examples are not found while testing was enabled")
|
||||
else()
|
||||
message(STATUS "Enabling testing for examples from documentation")
|
||||
enable_testing()
|
||||
add_subdirectory(${TBB_DOC_EXAMPLES_DIRECTORY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TBB_BENCH)
|
||||
if (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/benchmark)
|
||||
message(FATAL_ERROR "Benchmarks are not supported yet")
|
||||
@@ -279,10 +384,27 @@ endif()
|
||||
|
||||
if (ANDROID_PLATFORM)
|
||||
if ("${ANDROID_STL}" STREQUAL "c++_shared")
|
||||
configure_file(
|
||||
"${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_ABI}/libc++_shared.so"
|
||||
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so"
|
||||
COPYONLY)
|
||||
if (${ANDROID_NDK_MAJOR} GREATER_EQUAL "25")
|
||||
if(ANDROID_ABI STREQUAL "arm64-v8a")
|
||||
set(ANDROID_TOOLCHAIN_NAME "aarch64-linux-android")
|
||||
elseif(ANDROID_ABI STREQUAL "x86_64")
|
||||
set(ANDROID_TOOLCHAIN_NAME "x86_64-linux-android")
|
||||
elseif(ANDROID_ABI STREQUAL "armeabi-v7a")
|
||||
set(ANDROID_TOOLCHAIN_NAME "arm-linux-androideabi")
|
||||
elseif(ANDROID_ABI STREQUAL "x86")
|
||||
set(ANDROID_TOOLCHAIN_NAME "i686-linux-android")
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${ANDROID_TOOLCHAIN_ROOT}/sysroot/usr/lib/${ANDROID_TOOLCHAIN_NAME}/libc++_shared.so"
|
||||
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so"
|
||||
COPYONLY)
|
||||
else()
|
||||
configure_file(
|
||||
"${ANDROID_NDK}/sources/cxx-stl/llvm-libc++/libs/${ANDROID_ABI}/libc++_shared.so"
|
||||
"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libc++_shared.so"
|
||||
COPYONLY)
|
||||
endif()
|
||||
endif()
|
||||
# This custom target may be implemented without separate CMake script, but it requires
|
||||
# ADB(Android Debug Bridge) executable file availability, so to incapsulate this requirement
|
||||
@@ -295,5 +417,16 @@ if (TBB4PY_BUILD)
|
||||
add_subdirectory(python)
|
||||
endif()
|
||||
|
||||
if (TCM_BUILD)
|
||||
set(TCM_SUBDIR_NAME thread_composability_manager)
|
||||
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${TCM_SUBDIR_NAME}")
|
||||
add_subdirectory(${TCM_SUBDIR_NAME})
|
||||
elseif (TCM_BUILD_OPTION_EXPLICITLY_SET)
|
||||
message(FATAL_ERROR "Build of Thread Composability Manager (TCM) is disabled since "
|
||||
"${TCM_SUBDIR_NAME} subdirectory does not exist")
|
||||
endif()
|
||||
unset(TCM_SUBDIR_NAME)
|
||||
endif()
|
||||
|
||||
# Keep it the last instruction.
|
||||
add_subdirectory(cmake/post_install)
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# Where component owners are known, add them here.
|
||||
|
||||
/oneTBB/src/tbb/ @kboyarinov
|
||||
/oneTBB/src/tbb/ @dnmokhov
|
||||
/oneTBB/include/oneapi/tbb/parallel_* @kboyarinov
|
||||
/oneTBB/include/oneapi/tbb/parallel_* @dnmokhov
|
||||
/oneTBB/include/oneapi/tbb/concurrent_* @kboyarinov
|
||||
/oneTBB/include/oneapi/tbb/flow_graph* @kboyarinov
|
||||
/oneTBB/include/oneapi/tbb/flow_graph* @aleksei-fedotov
|
||||
/oneTBB/include/oneapi/tbb/detail/_flow_graph* @kboyarinov
|
||||
/oneTBB/include/oneapi/tbb/detail/_flow_graph* @aleksei-fedotov
|
||||
/oneTBB/include/oneapi/tbb/detail/_concurrent* @kboyarinov
|
||||
/oneTBB/src/doc @aepanchi
|
||||
/oneTBB/src/doc @omalyshe
|
||||
/oneTBB/src/tbbbind/ @isaevil
|
||||
/oneTBB/src/tbbmalloc/ @lplewa
|
||||
/oneTBB/src/tbbmalloc_proxy/ @lplewa
|
||||
/oneTBB/cmake/ @isaevil
|
||||
/oneTBB/*CMakeLists.txt @isaevil
|
||||
/oneTBB/python/ @isaevil
|
||||
/oneTBB/rfcs/ @vossmjp
|
||||
/oneTBB/rfcs/ @akukanov
|
||||
|
||||
# Bazel build related files.
|
||||
/oneTBB/.bazelversion @Vertexwahn
|
||||
/oneTBB/Bazel.md @Vertexwahn
|
||||
/oneTBB/BUILD.bazel @Vertexwahn
|
||||
/oneTBB/MODULE.bazel @Vertexwahn
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
||||
identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall
|
||||
community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
||||
any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address,
|
||||
without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official email address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
oneTBBCodeOfConduct At intel DOT com.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or permanent
|
||||
ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
||||
community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
||||
[https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
|
||||
+12
-20
@@ -19,40 +19,32 @@ As an open source project, we welcome community contributions to oneAPI Threadin
|
||||
|
||||
## Licensing
|
||||
|
||||
Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. The oneTBB project uses the [Apache 2.0 License](https://github.com/oneapi-src/oneTBB/blob/master/LICENSE.txt), a permissive open source license that allows you to freely use, modify, and distribute your own products that include Apache 2.0 licensed software. By contributing to the oneTBB project, you agree to the license and copyright terms therein and release your own contributions under these terms.
|
||||
Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired. The oneTBB project uses the [Apache 2.0 License](https://github.com/uxlfoundation/oneTBB/blob/master/LICENSE.txt), a permissive open source license that allows you to freely use, modify, and distribute your own products that include Apache 2.0 licensed software. By contributing to the oneTBB project, you agree to the license and copyright terms therein and release your own contributions under these terms.
|
||||
|
||||
Some imported or reused components within oneTBB use other licenses, as described in [third-party-programs.txt](https://github.com/oneapi-src/oneTBB/blob/master/third-party-programs.txt). By carefully reviewing potential contributions and enforcing a [Developer Certification of Origin (DCO)](https://developercertificate.org/) for contributed code, we can ensure that the community can develop products with oneTBB without concerns over patent or copyright issues.
|
||||
|
||||
The DCO is an attestation attached to every contribution made by every developer. In the commit message of the contribution, (described later), the developer simply adds a Signed-off-by statement and thereby agrees to the DCO.
|
||||
Some imported or reused components within oneTBB use other licenses, as described in [third-party-programs.txt](https://github.com/uxlfoundation/oneTBB/blob/master/third-party-programs.txt). By carefully reviewing potential contributions, we can ensure that the community can develop products with oneTBB without concerns over patent or copyright issues.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
As a contributor, you’ll want to be familiar with the oneTBB project and the repository layout. You should also know how to use it as explained in the [oneTBB documentation](https://oneapi-src.github.io/oneTBB/) and how to set up your build development environment to configure, build, and test oneTBB as explained in the [oneTBB Build System Description](cmake/README.md).
|
||||
|
||||
## Issues
|
||||
If you face a problem, first check out open [oneTBB GitHub issues](https://github.com/oneapi-src/oneTBB/issues) to see if the issue you’d like to address is already reported. You may find users that have encountered the bug you’re finding or have similar ideas for changes or additions.
|
||||
|
||||
You can use issues to report a problem, make a feature request, or add comments on an existing issue.
|
||||
As a contributor, you'll want to be familiar with the oneTBB project and the repository layout. You should also know how to use it as explained in the [oneTBB documentation](https://uxlfoundation.github.io/oneTBB/) and how to set up your build development environment to configure, build, and test oneTBB as explained in the [oneTBB Build System Description](cmake/README.md).
|
||||
|
||||
## Pull Requests
|
||||
|
||||
You can find all [open oneTBB pull requests](https://github.com/oneapi-src/oneTBB/pulls) on GitHub.
|
||||
|
||||
No anonymous contributions are accepted. The name in the commit message Signed-off-by line and your email must match the change authorship information. Make sure your .gitconfig is set up correctly so you can use `git commit -s` for signing your patches:
|
||||
|
||||
`git config --global user.name "Taylor Developer"`
|
||||
|
||||
`git config --global user.email taylor.developer@company.com`
|
||||
You can find all [open oneTBB pull requests](https://github.com/uxlfoundation/oneTBB/pulls) on GitHub.
|
||||
|
||||
### Before contributing changes directly to the oneTBB repository
|
||||
|
||||
* Make sure you can build the product and run all the tests with your patch.
|
||||
* For a larger feature, provide a relevant test.
|
||||
* Document your code. The oneTBB project uses reStructuredText for documentation.
|
||||
* If your documentation has code samples or examples, place them into the corresponding example folder.
|
||||
* Update the copyright year in the first line of the changing file(s).
|
||||
For example, if you commit your changes in 2022:
|
||||
* the copyright year should be `2005-2022` for existing files
|
||||
* the copyright year should be `2022` for new files
|
||||
For example, if you commit your changes in 2025:
|
||||
* the copyright year should be `2005-2025` for existing files
|
||||
* the copyright year should be `2025` for new files
|
||||
* Submit a pull request into the master branch. You can submit changes with a pull request (preferred) or by sending an email patch.
|
||||
|
||||
Code changes that are known or suspected to break support for any currently supported hardware are not allowed.
|
||||
Contributors should make a reasonable effort to ensure compatibility with these platforms. If a contribution
|
||||
inadvertently affects hardware support, the community will work together to address and resolve the issue.
|
||||
|
||||
Continuous Integration (CI) testing is enabled for the repository. Your pull request must pass all checks before it can be merged. We will review your contribution and may provide feedback to guide you if any additional fixes or modifications are necessary. When reviewed and accepted, your pull request will be merged into our GitHub repository.
|
||||
|
||||
+40
-15
@@ -1,13 +1,22 @@
|
||||
# Installation from Sources
|
||||
# Install
|
||||
|
||||
## Install from Release Packages
|
||||
|
||||
## Prerequisites
|
||||
To install oneTBB from the release packages, use the following commands:
|
||||
|
||||
```bash
|
||||
tar -xvf oneapi-tbb-xxx.xx.x-*.tgz
|
||||
source env/vars.sh
|
||||
```
|
||||
## Install from Sources
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Make sure you have installed CMake version 3.1 (or newer) on your system. oneTBB uses CMake build configuration.
|
||||
- Configure and build oneTBB. To work with build configurations, see [Build System Description](cmake/README.md).
|
||||
|
||||
|
||||
## Configure oneTBB
|
||||
### Configure oneTBB
|
||||
|
||||
At the command prompt, type:
|
||||
```
|
||||
@@ -16,13 +25,16 @@ cmake <options> <repo_root>
|
||||
|
||||
You may want to use some additional options for configuration:
|
||||
|
||||
| Option | Purpose | Description |
|
||||
| ------ |------ | ------ |
|
||||
| `-G <generator>` | Specify project generator | For more information, run cmake `–help`. |
|
||||
|`-DCMAKE_BUILD_TYPE=Debug` | Specify for Debug build | Not applicable for multi-configuration generators such as Visual Studio generator. |
|
||||
| Option | Purpose | Description |
|
||||
|---------------------------------------------|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `-G <generator>` | Specify project generator | For more information, run cmake `–help`. |
|
||||
| `-DCMAKE_BUILD_TYPE=Debug` | Specify for Debug build | Not applicable for multi-configuration generators such as Visual Studio generator. |
|
||||
| `-DTBB_VERIFY_DEPENDENCY_SIGNATURE=ON\|OFF` | Controls signature verification of dynamic dependencies loaded during runtime | If set to ON, only the signed dynamic dependencies are loaded. This is the recommended behavior. By default, the value is unspecified. Therefore, the warning is printed. To suppress the warning, set the value explicitly. |
|
||||
|
||||
For a more detailed list of available CMake configuration options see [Build System
|
||||
Description](./cmake/README.md)
|
||||
|
||||
## Build oneTBB
|
||||
### Build oneTBB
|
||||
|
||||
To build the system, run:
|
||||
```
|
||||
@@ -34,7 +46,7 @@ Some useful build options:
|
||||
- `--config <Release|Debug>` - build configuration, applicable only for multi-config generators such as Visual Studio generator.
|
||||
|
||||
|
||||
## Install and Pack oneTBB
|
||||
### Install and Pack oneTBB
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
@@ -61,7 +73,7 @@ You can use the ``install`` components for partial installation.
|
||||
The following install components are supported:
|
||||
- `runtime` - oneTBB runtime package (core shared libraries and `.dll` files on Windows* OS).
|
||||
- `devel` - oneTBB development package (header files, CMake integration files, library symbolic links, and `.lib` files on Windows* OS).
|
||||
- `tbb4py` - [oneTBB Module for Python](#onetbb-python-module-support).
|
||||
- `tbb4py` - [oneTBB Module for Python](https://github.com/uxlfoundation/oneTBB/blob/master/python/README.md).
|
||||
|
||||
If you want to install specific components after configuration and build, run:
|
||||
|
||||
@@ -77,16 +89,29 @@ cmake <options> ..
|
||||
cpack
|
||||
```
|
||||
|
||||
## Example of Installation
|
||||
### Installation from vcpkg
|
||||
|
||||
### Single-configuration generators
|
||||
You can download and install oneTBB using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
|
||||
```sh
|
||||
git clone https://github.com/Microsoft/vcpkg.git
|
||||
cd vcpkg
|
||||
./bootstrap-vcpkg.sh #.\bootstrap-vcpkg.bat(for Windows)
|
||||
./vcpkg integrate install
|
||||
./vcpkg install tbb
|
||||
```
|
||||
|
||||
The oneTBB port in vcpkg is kept up to date by Microsoft* team members and community contributors. If the version is out of date, create an issue or pull request on the [vcpkg repository](https://github.com/Microsoft/vcpkg).
|
||||
|
||||
### Example
|
||||
|
||||
#### Single-Configuration Generators
|
||||
|
||||
The following example demonstrates how to install oneTBB for single-configuration generators (e.g. GNU Make, Ninja, etc.).
|
||||
```bash
|
||||
# Do our experiments in /tmp
|
||||
cd /tmp
|
||||
# Clone oneTBB repository
|
||||
git clone https://github.com/oneapi-src/oneTBB.git
|
||||
git clone https://github.com/uxlfoundation/oneTBB.git
|
||||
cd oneTBB
|
||||
# Create binary directory for out-of-source build
|
||||
mkdir build && cd build
|
||||
@@ -99,7 +124,7 @@ cmake --install .
|
||||
# Well done! Your installed oneTBB is in /tmp/my_installed_onetbb
|
||||
```
|
||||
|
||||
### Multi-configuration generators
|
||||
#### Multi-Configuration Generators
|
||||
|
||||
The following example demonstrates how to install oneTBB for multi-configuration generators such as Visual Studio*.
|
||||
|
||||
@@ -108,7 +133,7 @@ Choose the configuration during the build and install steps:
|
||||
REM Do our experiments in %TMP%
|
||||
cd %TMP%
|
||||
REM Clone oneTBB repository
|
||||
git clone https://github.com/oneapi-src/oneTBB.git
|
||||
git clone https://github.com/uxlfoundation/oneTBB.git
|
||||
cd oneTBB
|
||||
REM Create binary directory for out-of-source build
|
||||
mkdir build && cd build
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
<!--
|
||||
******************************************************************************
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/-->
|
||||
|
||||
# Introduction
|
||||
|
||||
This document defines roles in the oneTBB project.
|
||||
|
||||
# Roles and Responsibilities
|
||||
|
||||
oneTBB project defines three main roles:
|
||||
* [Contributor](#contributor)
|
||||
* [Code Owner](#code-Owner)
|
||||
* [Maintainer](#maintainer)
|
||||
|
||||
[permissions]: https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#permissions-for-each-role
|
||||
|
||||
| | Contributor | Code Owner | Maintainer |
|
||||
| :------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------: | :---------------------: | :---------------------: |
|
||||
| _Responsibilities_ | | | |
|
||||
| Follow the [Code of Conduct](./CODE_OF_CONDUCT.md) | ✓ | ✓ | ✓ |
|
||||
| Follow [Contribution Guidelines](./CONTRIBUTING.md) | ✓ | ✓ | ✓ |
|
||||
| Ensure [Contribution Guidelines](./CONTRIBUTING.md) are followed | ✗ | ✓ | ✓ |
|
||||
| Co-own component or aspect of the library,<br> including contributing: bug fixes, implementing features,<br> and performance optimizations | ✗ | ✓ | ✓ |
|
||||
| Co-own on technical direction of component or<br> aspect of the library including work on RFCs | ✗ | ✓ | ✓ |
|
||||
| Co-own the project as a whole,<br> including determining strategy and policy for the project | ✗ | ✗ | ✓ |
|
||||
| _Privileges_ | | | |
|
||||
| Permission granted | [Read][permissions] | [Write][permissions] | [Maintain][permissions] |
|
||||
| Eligible to become | Code Owner | Maintainer | ✗ |
|
||||
| Can recommend Contributors<br> to become Code Owner | ✗ | ✓ | ✓ |
|
||||
| Can participate in promotions of<br> Code Owners and Maintainers | ✗ | ✗ | ✓ |
|
||||
| Can suggest Milestones during planning | ✓ | ✓ | ✓ |
|
||||
| Can choose Milestones for specific component | ✗ | ✓ | ✓ |
|
||||
| Make a decision on project's Milestones during planning | ✗ | ✗ | ✓ |
|
||||
| Can propose new RFC or<br> participate in review of existing RFC | ✓ | ✓ | ✓ |
|
||||
| Can request rework of RFCs<br> in represented area of responsibility | ✗ | ✓ | ✓ |
|
||||
| Can request rework of RFCs<br> in any part of the project | ✗ | ✗ | ✓ |
|
||||
| Can manage release process of the project | ✗ | ✗ | ✓ |
|
||||
| Can represent the project in public as a Maintainer | ✗ | ✗ | ✓ |
|
||||
|
||||
These roles are merit based. Refer to the corresponding section for specific
|
||||
requirements and the nomination process.
|
||||
|
||||
## Contributor
|
||||
|
||||
A Contributor invests time and resources to improve oneTBB project.
|
||||
Anyone can become a Contributor by bringing value in any following way:
|
||||
* Answer questions from community members.
|
||||
* Propose changes to the design.
|
||||
* Provide feedback on design proposals.
|
||||
* Review and/or test pull requests.
|
||||
* Test releases and report bugs.
|
||||
* Contribute code, including bug fixes, features implementations,
|
||||
and performance optimizations.
|
||||
|
||||
## Code Owner
|
||||
|
||||
A Code Owner has responsibility for a specific project component or a functional
|
||||
area. Code Owners are collectively responsible
|
||||
for developing and maintaining their component or functional areas, including
|
||||
reviewing all changes to corresponding areas of responsibility and indicating
|
||||
whether those changes are ready to be merged. Code Owners have a track record of
|
||||
contribution and review in the project.
|
||||
|
||||
**Requirements:**
|
||||
* Track record of accepted code contributions to a specific project component.
|
||||
* Track record of contributions to the code review process.
|
||||
* Demonstrate in-depth knowledge of the architecture of a specific project
|
||||
component.
|
||||
* Commit to being responsible for that specific area.
|
||||
|
||||
How to become a Code Owner?
|
||||
1. A Contributor is nominated by opening a PR modifying the MAINTAINERS.md file
|
||||
including name, Github username, and affiliation.
|
||||
2. At least two specific component Maintainers approve the PR.
|
||||
3. [CODEOWNERS](./CODEOWNERS) file is updated to represent corresponding areas of responsibility.
|
||||
|
||||
## Maintainer
|
||||
Maintainers are the most established contributors responsible for the
|
||||
project technical direction. They participate in making decisions about the
|
||||
strategy and priorities of the project.
|
||||
|
||||
**Requirements:**
|
||||
* Have experience as a Code Owner.
|
||||
* Track record of major project contributions to a specific project component.
|
||||
* Demonstrate deep knowledge of a specific project component.
|
||||
* Demonstrate broad knowledge of the project across multiple areas.
|
||||
* Commit to using privileges responsibly for the good of the project.
|
||||
* Be able to exercise judgment for the good of the project, independent of
|
||||
their employer, friends, or team.
|
||||
|
||||
Process of becoming a maintainer:
|
||||
1. A Maintainer may nominate a current code owner to become a new Maintainer by
|
||||
opening a PR against MAINTAINERS.md file.
|
||||
2. A majority of the current Maintainers must then approve the PR.
|
||||
|
||||
# Code Owners and Maintainers List
|
||||
|
||||
## oneTBB core (API, Architecture, Tests)
|
||||
|
||||
| Name | Github ID | Affiliation | Role |
|
||||
| --------------------- | --------------------- | ----------------- | ---------- |
|
||||
| Ilya Isaev | @isaevil | Intel Corporation | Code Owner |
|
||||
| Alexey Kukanov | @akukanov | Intel Corporation | Code Owner |
|
||||
| Konstantin Boyarinov | @kboyarinov | Intel Corporation | Maintainer |
|
||||
| Aleksei Fedotov | @aleksei-fedotov | Intel Corporation | Maintainer |
|
||||
| Michael Voss | @vossmjp | Intel Corporation | Maintainer |
|
||||
| Dmitri Mokhov | @dnmokhov | Intel Corporation | Maintainer |
|
||||
|
||||
## oneTBB TBBMALLOC (API, Architecture, Tests)
|
||||
|
||||
| Name | Github ID | Affiliation | Role |
|
||||
| --------------------- | --------------------- | ----------------- | ---------- |
|
||||
| Łukasz Plewa | @lplewa | Intel Corporation | Maintainer |
|
||||
|
||||
|
||||
## oneTBB Documentation
|
||||
|
||||
| Name | Github ID | Affiliation | Role |
|
||||
| ---------------------- | --------------------- | ----------------- | ---------- |
|
||||
| Alexandra Epanchinzeva | @aepanchi | Independent | Code Owner |
|
||||
| Olga Malysheva | @omalyshe | Intel Corporation | Code Owner |
|
||||
|
||||
|
||||
## oneTBB Release Management
|
||||
|
||||
| Name | Github ID | Affiliation | Role |
|
||||
| ------------------ | --------------------- | ----------------- | ---------- |
|
||||
| Olga Malysheva | @omalyshe | Intel Corporation | Maintainer |
|
||||
+10
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Intel Corporation
|
||||
# Copyright (c) 2021-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,14 @@
|
||||
# limitations under the License.
|
||||
|
||||
# DISCLAIMER: Bazel support is community-based. The maintainers do not
|
||||
# use Bazel internally. The Bazel build can have security risks or
|
||||
# use Bazel internally. The Bazel build can have security risks or
|
||||
# optimization gaps.
|
||||
|
||||
build --symlink_prefix=/ # Out of source build
|
||||
module(
|
||||
name = "onetbb",
|
||||
compatibility_level = 1,
|
||||
)
|
||||
|
||||
bazel_dep(name = "platforms", version = "0.0.11")
|
||||
bazel_dep(name = "rules_cc", version = "0.1.1")
|
||||
bazel_dep(name = "rules_license", version = "1.0.0")
|
||||
@@ -1,5 +1,11 @@
|
||||
# oneAPI Threading Building Blocks
|
||||
[](LICENSE.txt) [](https://github.com/oneapi-src/oneTBB/actions/workflows/ci.yml?query=branch%3Amaster)
|
||||
# oneAPI Threading Building Blocks (oneTBB) <img align="right" width="200" height="100" src="https://raw.githubusercontent.com/uxlfoundation/artwork/e98f1a7a3d305c582d02c5f532e41487b710d470/foundation/uxl-foundation-logo-horizontal-color.svg">
|
||||
[](LICENSE.txt) [](https://github.com/uxlfoundation/oneTBB/actions/workflows/ci.yml?query=branch%3Amaster)
|
||||
[](https://github.com/uxlfoundation/oneTBB/discussions)
|
||||
[](https://www.bestpractices.dev/projects/9125)
|
||||
[](https://securityscorecards.dev/viewer/?uri=github.com/uxlfoundation/oneTBB)
|
||||
[](https://gurubase.io/g/onetbb)
|
||||
[](https://scan.coverity.com/projects/oneapi-src-onetbb)
|
||||
[](https://scan.coverity.com/projects/uxlfoundation-onetbb)
|
||||
|
||||
oneTBB is a flexible C++ library that simplifies the work of adding parallelism
|
||||
to complex applications, even if you are not a threading expert.
|
||||
@@ -18,37 +24,48 @@ The library differs from typical threading packages in the following ways:
|
||||
|
||||
Refer to oneTBB [examples](examples) and [samples](https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB) to see how you can use the library.
|
||||
|
||||
oneTBB is a part of [oneAPI](https://oneapi.io). The current branch implements version 1.1 of oneAPI Specification.
|
||||
oneTBB is a part of the [UXL Foundation](http://www.uxlfoundation.org) and is an implementation of [oneAPI specification](https://oneapi.io).
|
||||
|
||||
> **_NOTE:_** Threading Building Blocks (TBB) is now called oneAPI Threading Building Blocks (oneTBB) to highlight that the tool is a part of the oneAPI ecosystem.
|
||||
|
||||
## Release Information
|
||||
Here are [Release Notes](RELEASE_NOTES.md) and [System Requirements](SYSTEM_REQUIREMENTS.md).
|
||||
|
||||
See [Release Notes](RELEASE_NOTES.md) and [System Requirements](SYSTEM_REQUIREMENTS.md).
|
||||
|
||||
## Documentation
|
||||
* [oneTBB Specification](https://spec.oneapi.com/versions/latest/elements/oneTBB/source/nested-index.html)
|
||||
* [oneTBB Developer Guide and Reference](https://oneapi-src.github.io/oneTBB)
|
||||
* [Migrating from TBB to oneTBB](https://oneapi-src.github.io/oneTBB/main/tbb_userguide/Migration_Guide.html)
|
||||
* [oneTBB Specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/nested-index)
|
||||
* [oneTBB Developer Guide and Reference](https://uxlfoundation.github.io/oneTBB)
|
||||
* [Migrating from TBB to oneTBB](https://uxlfoundation.github.io/oneTBB/main/tbb_userguide/Migration_Guide.html)
|
||||
* [README for the CMake build system](cmake/README.md)
|
||||
* [oneTBB Testing Approach](https://oneapi-src.github.io/oneTBB/main/intro/testing_approach.html)
|
||||
* [oneTBB Versioning Policies](VERSIONING.md)
|
||||
* [oneTBB Testing Approach](https://uxlfoundation.github.io/oneTBB/main/intro/testing_approach.html)
|
||||
* [Basic support for the Bazel build system](Bazel.md)
|
||||
* [oneTBB Discussions](https://github.com/oneapi-src/oneTBB/discussions)
|
||||
* [oneTBB Discussions](https://github.com/uxlfoundation/oneTBB/discussions)
|
||||
* [WASM Support](WASM_Support.md)
|
||||
|
||||
## Installation
|
||||
See [Installation from Sources](INSTALL.md) to learn how to install oneTBB.
|
||||
|
||||
## Governance
|
||||
|
||||
The oneTBB project is governed by the UXL Foundation.
|
||||
You can get involved in this project in following ways:
|
||||
* Join the [Open Source and Specification Working Group](https://github.com/uxlfoundation/foundation/tree/main?tab=readme-ov-file#working-groups) meetings.
|
||||
* Join the mailing lists for the [UXL Foundation](https://lists.uxlfoundation.org/g/main/subgroups) to receive meetings schedule and latest updates.
|
||||
* Contribute to oneTBB project or oneTBB specification. Read [CONTRIBUTING](./CONTRIBUTING.md) for more information.
|
||||
|
||||
## Support
|
||||
Please report issues and suggestions via [GitHub issues](https://github.com/oneapi-src/oneTBB/issues). See our [documentation](./CONTRIBUTING.md##Issues) to learn how to work with them.
|
||||
See our [documentation](./SUPPORT.md) to learn how to request help.
|
||||
|
||||
## How to Contribute
|
||||
We welcome community contributions, so check our [Contributing Guidelines](CONTRIBUTING.md)
|
||||
to learn more.
|
||||
|
||||
Use GitHub Issues for feature requests, bug reports, and minor inquiries. For broader questions and development-related discussions, use GitHub Discussions.
|
||||
|
||||
## License
|
||||
oneAPI Threading Building Blocks is licensed under [Apache License, Version 2.0](LICENSE.txt).
|
||||
By its terms, contributions submitted to the project are also done under that license.
|
||||
|
||||
|
||||
## Engineering team contacts
|
||||
* [Email us.](mailto:inteltbbdevelopers@intel.com)
|
||||
|
||||
------------------------------------------------------------------------
|
||||
\* All names and brands may be claimed as the property of others.
|
||||
|
||||
+423
-10
@@ -14,16 +14,376 @@
|
||||
* limitations under the License.
|
||||
*******************************************************************************/-->
|
||||
|
||||
# Release Notes <!-- omit in toc -->
|
||||
This document contains changes of oneTBB compared to the last release.
|
||||
# oneTBB 2023.1 Release Notes
|
||||
|
||||
## Table of Contents <!-- omit in toc -->
|
||||
- [New Features](#new_features)
|
||||
- [Known Limitations](#known-limitations)
|
||||
- [Fixed Issues](#fixed-issues)
|
||||
- [Open-source Contributions Integrated](#open-source-contributions-integrated)
|
||||
## :rocket: Preview Features
|
||||
- NUMA Optimization: Use new interleaved memory allocation APIs to explicitly control memory placement across NUMA nodes. The ``allocate_numa_interleaved`` and ``deallocate_numa_interleaved`` functions allocate and deallocate memory across multiple NUMA nodes, helping increase bandwidth and avoid bottlenecks from single-node allocation.
|
||||
- C++20 Modules: This release adds experimental support for C++20 modules with the introduction of ``include/oneapi/tbb.cppm``. Developers can use this instead of traditional headers to reduce compilation times and improve encapsulation.
|
||||
|
||||
## :white_check_mark: New Features
|
||||
## :tada: New Features
|
||||
- oneTBB repository now contains Thread Composability Manager (TCM) source code - a project that helps in limiting oversubscription that can arise when multiple parallel runtimes are used within an application. More information is available at https://uxlfoundation.github.io/oneTBB/main/tbb_userguide/appendix_B.html#avoid-cpu-overutilization
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- When CPU resource coordination is enabled by setting the TCM_ENABLE environment variable to 1, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- Using oneTBB on WASM* may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Added IPO build support for modern Intel compilers with old CMake under Linux*.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Improved support for GNU* Hurd*. Contributed by Petter Reinholdtsen (https://github.com/uxlfoundation/oneTBB/pull/2028, https://github.com/uxlfoundation/oneTBB/pull/2038, https://github.com/uxlfoundation/oneTBB/pull/2026).
|
||||
- Fixed Windows* build on ARM64* when using MSVC. contributed by navvyswethgraphics (https://github.com/uxlfoundation/oneTBB/pull/2030).
|
||||
|
||||
|
||||
# oneTBB 2023.0 Release Notes
|
||||
|
||||
## :rocket: Preview Features
|
||||
- Introduced ability to wait for a single task in a ``task_group`` instead of waiting for all tasks to finish. This increases reactivity and decreases latency in key user workloads.
|
||||
- Introduced ``flow::resource_limited_node`` and ``flow::resource_limiter`` classes. These nodes only execute when they can successfully acquire the necessary resources from the resource limiters associated with the node. This feature is used to guard access to shared resources, while maximizing available parallelism in the graph.
|
||||
- Introduced ``task_arena`` core type selector to better support hybrid architectures with several core types. Users use this new flexible API to more tightly constrain execution to set preferences for the specific core types that match their workload.
|
||||
- Added global control parameter to set default block time behavior on server HW. This allows developers to revert to older blocking behavior if their applications are not able to fully utilize all cores, thereby reducing idle spinning.
|
||||
|
||||
|
||||
## :tada: New Features
|
||||
- Added new API to create a set of NUMA bound task arenas, simplifying common patterns used to optimize for NUMA architectures.
|
||||
- Extended Flow Graph functional node deduction guides to support non-static member function and member object pointers as a node bodies.
|
||||
- The Flow Graph join_node and indexer_node now support 10 or more input ports.
|
||||
- Explicit deduction guides for ``blocked_nd_range`` are now a fully supported feature.
|
||||
- Added native WASM exception handling support.
|
||||
- Added support for Python 3.14.
|
||||
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- When CPU resource coordination is enabled by setting the TCM_ENABLE environment variable to 1, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- Using oneTBB on WASM* may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Significantly improved scalability for concurrent ordered containers on systems with many threads. This change results in greater than 3x performance for some use cases.
|
||||
- Fixed ODR violations when public inline functions expose entities with internal linkage.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Updated tbb4py installation approach to be aligned with PEP517. Contributed by Ben Greiner (https://github.com/uxlfoundation/oneTBB/pull/1941).
|
||||
- Improved usage of <windows.h> in oneTBB code. Contributed by Aras Pranckevičius (https://github.com/uxlfoundation/oneTBB/pull/1932).
|
||||
- Fixed CMake build issue with Clang on Windows*. Contributed by JustinZhu (https://github.com/uxlfoundation/oneTBB/pull/1936).
|
||||
|
||||
|
||||
# oneTBB 2022.3 Release Notes
|
||||
|
||||
## :rocket: Preview Features
|
||||
- Introduced API for setting dynamic task dependencies in task_group. This allows successor tasks to execute only after all their predecessors have completed.
|
||||
|
||||
|
||||
## :tada: New Features
|
||||
- Extended task_arena with API support for enqueuing functions into a task_group and waiting for the task_group to complete.
|
||||
- Introduced API for setting and getting the assertion handler. This allows applications to set their own assertion handling functions.
|
||||
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.
|
||||
- When CPU resource coordination is enabled by setting the TCM_ENABLE environment variable to 1, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- When CPU resource coordination is enabled, cgroups CPU quota and period limitations settings are ignored.
|
||||
- Using oneTBB on WASM* may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed overwrite_node and write_once_node to prevent premature trigger of continue_node successors.
|
||||
- Fixed keys duplication in concurrent_hash_map when the container is initialized using a pair of iterators, or std::initializer_list (https://github.com/uxlfoundation/oneTBB/issues/1764).
|
||||
- Improved support for profiling tools by allowing the oneTBB notifications to be ignored by tools and by better timing of task completion notifications.
|
||||
- Fixed incorrect deallocation of tasks in task_group (https://github.com/uxlfoundation/oneTBB/issues/1834).
|
||||
- Improved performance scalability of spin_mutex::lock, spin_mutex::try_lock and queuing_mutex::scoped_lock::try_acquire.
|
||||
- Fixed potential oversubscription issue by respecting CPU quota and period limitations provided via cgroups settings on Linux* (https://github.com/uxlfoundation/oneTBB/issues/190, https://github.com/uxlfoundation/oneTBB/issues/1760).
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fixed CMake build issue on some architectures. Contributed by lmarz (https://github.com/uxlfoundation/oneTBB/pull/1768).
|
||||
- Fixed stack size assertion failure when running with ASAN. Contributed by omegacoleman (https://github.com/uxlfoundation/oneTBB/pull/1782).
|
||||
- Improved Bazel support on non-x86 architectures. Contributed by Caleb Zulawski (https://github.com/uxlfoundation/oneTBB/pull/1790).
|
||||
- Fixed potential crash caused by nullptr dereference for the tag_matching join_node. Contributed by Federico Ficarelli (https://github.com/uxlfoundation/oneTBB/pull/1800).
|
||||
- Fixed false positive GCC* warnings. Contributed by Zizheng Guo (https://github.com/uxlfoundation/oneTBB/pull/1752).
|
||||
- Fixed ASAN detection for Clang*. Contributed by Federico Ficarelli (https://github.com/uxlfoundation/oneTBB/pull/1842).
|
||||
|
||||
|
||||
# oneTBB 2022.2 Release Notes
|
||||
|
||||
## :tada: New Features
|
||||
- Improved Hybrid CPU and NUMA Platforms API Support: Enhanced API availability for better compatibility with Hybrid CPU and NUMA platforms.
|
||||
- Added support for verifying signatures of dynamic dependencies at runtime. To enable this feature, specify
|
||||
``-DTBB_VERIFY_DEPENDENCY_SIGNATURE=ON`` when invoking CMake.
|
||||
- Added support for printing warning messages about issues in dynamic dependency loading. To see these messages in the console, build the library with the ``TBB_DYNAMIC_LINK_WARNING`` macro defined.
|
||||
- Added a Natvis file for custom visualization of TBB containers when debugging with Microsoft* Visual Studio.
|
||||
- Refined Environment Setup: Replaced CPATH with ``C_INCLUDE_PATH and CPLUS_INCLUDE_PATH`` in environment setup to avoid unintended compiler warnings caused by globally applied include paths.
|
||||
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.
|
||||
- When CPU resource coordination is enabled, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- Using oneTBB on WASM* may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fixed a CMake configuration error on systems with non-English locales. Contributed by moritz-h (https://github.com/uxlfoundation/oneTBB/pull/1606).
|
||||
- Made the install destination of import libraries on Windows* configurable. Contributed by Bora Yalçıner (https://github.com/uxlfoundation/oneTBB/pull/1613).
|
||||
- Resolved an in-source CMake build error. Contributed by Dmitrii Golovanov (https://github.com/uxlfoundation/oneTBB/pull/1670).
|
||||
- Migrated the build system to Bazel* version 8.1.1. Contributed by Julian Amann (https://github.com/uxlfoundation/oneTBB/pull/1694).
|
||||
- Fixed build errors on MinGW* and FreeBSD*. Contributed by John Ericson (https://github.com/uxlfoundation/oneTBB/pull/1696).
|
||||
- Addressed build errors on macOS* when using the GCC compiler. Contributed by Oleg Butakov (https://github.com/uxlfoundation/oneTBB/pull/1603).
|
||||
|
||||
# oneTBB 2022.1 Release Notes
|
||||
|
||||
## :tada: New Features
|
||||
- The oneTBB repository migrated to the new [UXL Foundation](https://github.com/uxlfoundation/oneTBB) organization.
|
||||
- ``blocked_nd_range`` is now a fully supported feature.
|
||||
- Introduced the ``ONETBB_SPEC_VERSION`` macro to specify the version of oneAPI specification implemented by the current version of the library.
|
||||
|
||||
|
||||
## :rocket: Preview Features
|
||||
- Added the explicit deduction guides to ``blocked_nd_range`` to support C++17 Class Template Argument Deduction.
|
||||
- Extended ``task_arena`` API to select TBB workers leave policy and to hint the start and the end of parallel computations.
|
||||
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.
|
||||
- When CPU resource coordination is enabled, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- Using oneTBB on WASM* may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed deadlock when using `tbb::concurrent_vector::grow_by()` (https://github.com/uxlfoundation/oneTBB/issues/1531).
|
||||
- Fixed assertion in the Debug version of oneTBB on systems with multiple processor groups.
|
||||
- Fixed issues with Flow Graph priorities when using limited concurrency nodes (https://github.com/uxlfoundation/oneTBB/issues/1595).
|
||||
- Improved support of ``tbb::task_arena::constraints`` functionality on Windows* systems with multiple processor groups.
|
||||
- Fixed ``concurrent_queue`` and ``concurrent_bounded_queue`` capacity preserving on copying, moving, and swapping (https://github.com/uxlfoundation/oneTBB/issues/1598).
|
||||
- Fixed ``parallel_for_each`` compilation issues on GCC 9 in C++20 mode (https://github.com/uxlfoundation/oneTBB/issues/1552).
|
||||
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fixed linkage errors when the application is built with the hidden symbols visibility. Contributed by Vladislav Shchapov (https://github.com/uxlfoundation/oneTBB/pull/1114).
|
||||
- On Linux* OS, for external thread, determined stack size using POSIX* API instead of relying on the stack size of a worker thread. Contributed by bongkyu7-kim (https://github.com/uxlfoundation/oneTBB/pull/1485).
|
||||
- Added a CMake option to use relative paths instead of full paths in debug information. Contributed by Fang Xu (https://github.com/uxlfoundation/oneTBB/pull/1401).
|
||||
- Improved OpenBSD* support by removing the use of direct syscalls. Contributed by Brad Smith (https://github.com/uxlfoundation/oneTBB/pull/1499).
|
||||
- Fixed build issues on ARM64* when using Bazel. Contributed by snadampal (https://github.com/uxlfoundation/oneTBB/pull/1571).
|
||||
- Suppressed deprecation warnings for CMake versions earlier than 3.10 when using the latest CMake. Contributed by Vladislav Shchapov (https://github.com/uxlfoundation/oneTBB/pull/1585).
|
||||
|
||||
# oneTBB 2022.0 Release Notes
|
||||
|
||||
## :rocket: Preview Features
|
||||
- Extended the Flow Graph receiving nodes with a new ``try_put_and_wait`` API that submits a message to the graph and waits for its completion.
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.
|
||||
- When CPU resource coordination is enabled, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- Using oneTBB on WASM*, may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/oneapi-src/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://oneapi-src.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed the missed signal for thread request for enqueue operation.
|
||||
- Significantly improved scalability of ``task_group``, ``flow_graph``, and ``parallel_for_each``.
|
||||
- Removed usage of ``std::aligned_storage`` deprecated in C++23 (Inspired by Valery Matskevich https://github.com/oneapi-src/oneTBB/pull/1394).
|
||||
- Fixed the issue where ``oneapi::tbb::info`` interfaces might interfere with the process affinity mask on the Windows* OS systems with multiple processor groups.
|
||||
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Detect the GNU Binutils version to determine WAITPKG support better. Contributed by Martijn Courteaux (https://github.com/oneapi-src/oneTBB/pull/1347).
|
||||
- Fixed the build on non-English locales. Contributed by Vladislav Shchapov (https://github.com/oneapi-src/oneTBB/pull/1450).
|
||||
- Improved Bazel support. Contributed by Julian Amann (https://github.com/oneapi-src/oneTBB/pull/1434).
|
||||
|
||||
# oneTBB 2021.13 Release Notes
|
||||
|
||||
## :tada: New Features
|
||||
- Extended the parallel_reduce and parallel_deterministic_reduce functional form API to better support rvalues reduction (https://github.com/uxlfoundation/oneTBB/pull/1299).
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.
|
||||
- When CPU resource coordination is enabled, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
- Using oneTBB on WASM* may cause applications to run in a single thread. See [Limitations of WASM Support](https://github.com/uxlfoundation/oneTBB/blob/master/WASM_Support.md#limitations).
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://uxlfoundation.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Improved security by excluding CWD from search of load-time dependencies.
|
||||
- Improved performance on Apple* platforms by aligning block-time behavior with other OS.
|
||||
- Improved performance on non-hybrid CPU hardware by reworking block-time behavior.
|
||||
- Improved performance on ARM64 platform by fixing backoff behavior for spin loops.
|
||||
- Improved performance when constraints API is used on server CPU HW with multiple NUMA nodes.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Improved WASM support by fixing a segmentation fault happening if global tbb::task_scheduler_observer is used. Contributed by Santiago Ospina De Los Ríos https://github.com/oneapi-src/oneTBB/pull#1346).
|
||||
|
||||
# oneTBB 2021.12 Release Notes
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293.
|
||||
- When CPU resource coordination is enabled, tasks from a lower-priority ``task_arena`` might be executed before tasks from a higher-priority ``task_arena``.
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://oneapi-src.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed ``parallel_for_each`` algorithm behavior for iterators defining ``iterator_concept`` trait instead of ``iterator_category``.
|
||||
- Fixed the redefinition issue for ``std::min`` and ``std::max`` on Windows* OS ([GitHub* #832](https://github.com/oneapi-src/oneTBB/issues/832)).
|
||||
- Fixed the incorrect binary search order in ``TBBConfig.cmake``.
|
||||
- Enabled the oneTBB library search using the pkg-config tool in Conda packages.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fixed the compiler warning for missing virtual destructor. Contributed by Elias Engelbert Plank (https://github.com/oneapi-src/oneTBB/pull/1215).
|
||||
|
||||
# oneTBB 2021.11 Release Notes
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows* OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
- Using ``TBBConfig.cmake`` in 32-bit environment may cause incorrect linkage with 64-bit oneTBB library. As a workaround, set ``CMAKE_PREFIX_PATH``:
|
||||
- On Linux* OS: to ``TBBROOT/lib32/``
|
||||
- On Windows* OS: to ``TBBROOT/lib32/;TBBROOT/bin32/``
|
||||
|
||||
> **_NOTE:_** To see known limitations that impact all versions of oneTBB, refer to [oneTBB Documentation](https://oneapi-src.github.io/oneTBB/main/intro/limitations.html).
|
||||
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed ``tbb::this_task_arena()`` behavior for specific ``tbb::task_arena{1,0}``.
|
||||
- Restored performance on systems with a high number of CPU cores that support ``_tpause``.
|
||||
|
||||
# oneTBB 2021.10 Release Notes
|
||||
|
||||
## :tada: New Features
|
||||
- Since C++17, parallel algorithms and Flow Graph nodes are allowed to accept pointers to the member functions and member objects as the user-provided callables.
|
||||
- Added missed member functions, such as assignment operators and swap function, to the ``concurrent_queue`` and ``concurrent_bounded_queue`` containers.
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- A static assert will cause compilation failures in oneTBB headers when compiling with clang 12.0.0 or newer if using the LLVM standard library with ``-ffreestanding`` and C++11/14 compiler options.
|
||||
- An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). Disable support for Parallel STL algorithms by defining ``PSTL_USE_PARALLEL_POLICIES`` (in libstdc++ 9) or ``_GLIBCXX_USE_TBB_PAR_BACKEND`` (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
- On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder like ``/usr/lib64``, the application may fail to link due to the order in which the linker searches for libraries. Use the ``-L`` linker option to specify the correct location of oneTBB library. This issue does not affect the program execution.
|
||||
- The ``oneapi::tbb::info`` namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc* version lower than 2.5.
|
||||
- Using a hwloc* version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows* OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA* topology may be detected incorrectly on Windows* OS machines where the number of NUMA* node threads exceeds the size of 1 processor group.
|
||||
- On Windows* OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying ``/wd4324`` to the compiler command line.
|
||||
- oneTBB does not support ``fork()``, to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed the hang in the reserve method of concurrent unordered containers ([GitHub* #1056](http://github.com/oneapi-src/oneTBB/issues/1056)).
|
||||
- Fixed the C++20 three-way comparison feature detection ([GitHub* #1093](http://github.com/oneapi-src/oneTBB/issues/1093)).
|
||||
- Fixed oneTBB integration with CMake* in the Conda* environment.
|
||||
|
||||
# oneTBB 2021.9 Release Notes
|
||||
|
||||
## :tada: New Features
|
||||
- Hybrid CPU support is now a fully supported feature.
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- A static assert will cause compilation failures in oneTBB headers when compiling with clang 12.0.0 or newer if using the LLVM standard library with -ffreestanding and C++11/14 compiler options.
|
||||
- An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). Disable support for Parallel STL algorithms by defining PSTL_USE_PARALLEL_POLICIES (in libstdc++ 9) or _GLIBCXX_USE_TBB_PAR_BACKEND (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
- On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder like /usr/lib64, the application may fail to link due to the order in which the linker searches for libraries. Use the -L linker option to specify the correct location of oneTBB library. This issue does not affect the program execution.
|
||||
- The oneapi::tbb::info namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- oneTBB does not support fork(), to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Improved robustness of thread creation algorithm on Linux* OS.
|
||||
- Enabled full support of Thread Sanitizer on macOS*
|
||||
- Fixed the issue with destructor calls for uninitialized objects in oneapi::tbb::parallel_for_each algorithm (GitHub* #691)
|
||||
- Fixed the issue with tbb::concurrent_lru_cache when items history capacity is zero (GitHub* #265)
|
||||
- Fixed compilation issues on modern GCC* versions
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fixed the issue reported by the Address Sanitizer. Contributed by Rui Ueyama (https://github.com/oneapi-src/oneTBB/pull/959).
|
||||
- Fixed the input_type alias exposed by flow_graph::join_node. Contributed by Deepan (https://github.com/oneapi-src/oneTBB/pull/868).
|
||||
|
||||
# oneTBB 2021.8 Release Notes
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- A static assert causes compilation failures in oneTBB headers when compiling with Clang* 12.0.0 or newer if using the LLVM* standard library with -ffreestanding and C++11/14 compiler options.
|
||||
- An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). Disable support for Parallel STL algorithms by defining PSTL_USE_PARALLEL_POLICIES (in libstdc++ 9) or _GLIBCXX_USE_TBB_PAR_BACKEND (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
- On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder like /usr/lib64, the application may fail to link due to the order in which the linker searches for libraries. Use the -L linker option to specify the correct location of oneTBB library. This issue does not affect the program execution.
|
||||
- The oneapi::tbb::info namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows* OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- oneTBB does not support fork(), to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Fixed oneapi::tbb::concurrent_bounded_queue::pop return type (GitHub* [#807](https://github.com/oneapi-src/oneTBB/issues/807)).
|
||||
- Fixed oneapi::tbb::concurrent_queue and oneapi::tbb::concurrent_bounded_queue with non-default constructible value types (GitHub* [#885](https://github.com/oneapi-src/oneTBB/issues/885)).
|
||||
- Fixed incorrect splitting of iteration space in case there is no support for proportional splitting in custom ranges.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fix for full LTO* build, library and tests, on UNIX* OS systems. Contributed by Vladislav Shchapov (https://github.com/oneapi-src/oneTBB/pull/798).
|
||||
|
||||
# oneTBB 2021.7 Release Notes
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- A static assert causes compilation failures in oneTBB headers when compiling with Clang* 12.0.0 or newer if using the LLVM* standard library with -ffreestanding and C++11/14 compiler options.
|
||||
- An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). Disable support for Parallel STL algorithms by defining PSTL_USE_PARALLEL_POLICIES (in libstdc++ 9) or _GLIBCXX_USE_TBB_PAR_BACKEND (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
- On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder like /usr/lib64, the application may fail to link due to the order in which the linker searches for libraries. Use the -L linker option to specify the correct location of oneTBB library. This issue does not affect the program execution.
|
||||
- The oneapi::tbb::info namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows* OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- oneTBB does not support fork(), to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Memory allocator crash when allocating ~1TB on 64-bit systems (GitHub* [#838](https://github.com/oneapi-src/oneTBB/issues/838)).
|
||||
- Fixed thread distribution over NUMA nodes on Windows* OS systems.
|
||||
- For oneapi::tbb::suspend, it is guaranteed that the user-specified callable object is executed by the calling thread.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Fix for full LTO* build, library and tests, on UNIX* OS systems. Contributed by Vladislav Shchapov (https://github.com/oneapi-src/oneTBB/pull/798).
|
||||
|
||||
# oneTBB 2021.6 Release Notes
|
||||
|
||||
## :tada: New Features
|
||||
- Improved support and use of the latest C++ standards for parallel_sort that allows using this algorithm with user-defined and standard library-defined objects with modern semantics.
|
||||
- The following features are now fully functional: task_arena extensions, collaborative_call_once, adaptive mutexes, heterogeneous overloads for concurrent_hash_map, and task_scheduler_handle.
|
||||
- Added support for Windows* Server 2022 and Python 3.10.
|
||||
@@ -38,7 +398,7 @@ This document contains changes of oneTBB compared to the last release.
|
||||
- oneTBB does not support fork(), to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
|
||||
## :hammer: Fixed Issues
|
||||
## :hammer: Issues Fixed
|
||||
- Memory allocator crash on a system with an incomplete /proc/meminfo (GitHub* [#584](https://github.com/oneapi-src/oneTBB/issues/584)).
|
||||
- Incorrect blocking of task stealing (GitHub* #[478](https://github.com/oneapi-src/oneTBB/issues/478)).
|
||||
- Hang due to incorrect decrement of a limiter_node (GitHub* [#634](https://github.com/oneapi-src/oneTBB/issues/634)).
|
||||
@@ -47,7 +407,60 @@ This document contains changes of oneTBB compared to the last release.
|
||||
- Crash when obtaining a range from empty ordered and unordered containers (GitHub* [#641](https://github.com/oneapi-src/oneTBB/issues/641)).
|
||||
- Deadlock in a concurrent_vector resize() that could happen when the new size is less than the previous size (GitHub* [#733](https://github.com/oneapi-src/oneTBB/issues/733)).
|
||||
|
||||
## :octocat: Open-source Contributions Integrated
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Improved aligned memory allocation. Contributed by Andrey Semashev (https://github.com/oneapi-src/oneTBB/pull/671).
|
||||
- Optimized usage of atomic_fence on IA-32 and Intel(R) 64 architectures. Contributed by Andrey Semashev (https://github.com/oneapi-src/oneTBB/pull/328).
|
||||
- Fixed incorrect definition of the assignment operator in containers. Contributed by Andrey Semashev (https://github.com/oneapi-src/oneTBB/issues/372).
|
||||
|
||||
# oneTBB 2021.5 Release Notes
|
||||
|
||||
## :rocket: Preview Features
|
||||
- Extended task_group interface with a new run_and_wait overload to accept task_handle.
|
||||
|
||||
## :tada: New Features
|
||||
- Enabled Microsoft Visual Studio* 2022 and Python 3.9 support.
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). Disable support for Parallel STL algorithms by defining PSTL_USE_PARALLEL_POLICIES (in libstdc++ 9) or _GLIBCXX_USE_TBB_PAR_BACKEND (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
- On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder like /usr/lib64, the application may fail to link due to the order in which the linker searches for libraries. Use the -L linker option to specify the correct location of oneTBB library. This issue does not affect the program execution.
|
||||
- The oneapi::tbb::info namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- oneTBB does not support fork(), to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
- C++ exception handling mechanism on Windows* OS on ARM64* might corrupt memory if an exception is thrown from any oneTBB parallel algorithm (see Windows* OS on ARM64* compiler issue: https://developercommunity.visualstudio.com/t/ARM64-incorrect-stack-unwinding-for-alig/1544293).
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Reworked synchronization mechanism to reduce contention when multiple task_arena's are used concurrently.
|
||||
- Fixed possible correctness issue in queuing_rw_mutex on non-Intel platforms.
|
||||
- Fixed GCC* 11 warnings.
|
||||
- Fixed sporadic memory corruption.
|
||||
|
||||
# oneTBB 2021.4 Release Notes
|
||||
|
||||
## :rocket: Preview Features
|
||||
- Introduced the collaborative_call_once algorithm that executes the callable object exactly once, but allows other threads to join oneTBB parallel construction used inside this callable object. Inspired by Ben FrantzDale and Henry Heffan.
|
||||
|
||||
## :rotating_light: Known Limitations
|
||||
- An application using Parallel STL algorithms in libstdc++ versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB). Disable support for Parallel STL algorithms by defining PSTL_USE_PARALLEL_POLICIES (in libstdc++ 9) or _GLIBCXX_USE_TBB_PAR_BACKEND (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
- On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder like /usr/lib64, the application may fail to link due to the order in which the linker searches for libraries. Use the -L linker option to specify the correct location of oneTBB library. This issue does not affect the program execution.
|
||||
- The oneapi::tbb::info namespace interfaces might unexpectedly change the process affinity mask on Windows* OS systems (see https://github.com/open-mpi/hwloc/issues/366 for details) when using hwloc version lower than 2.5.
|
||||
- Using a hwloc version other than 1.11, 2.0, or 2.5 may cause an undefined behavior on Windows OS. See https://github.com/open-mpi/hwloc/issues/477 for details.
|
||||
- The NUMA topology may be detected incorrectly on Windows OS machines where the number of NUMA node threads exceeds the size of 1 processor group.
|
||||
- On Windows OS on ARM64*, when compiling an application using oneTBB with the Microsoft* Compiler, the compiler issues a warning C4324 that a structure was padded due to the alignment specifier. Consider suppressing the warning by specifying /wd4324 to the compiler command line.
|
||||
- oneTBB does not support fork(), to work-around the issue, consider using task_scheduler_handle to join oneTBB worker threads before using fork().
|
||||
|
||||
## :hammer: Issues Fixed
|
||||
- Enabled full support of Address Sanitizer and Thread Sanitizer.
|
||||
- Fixed a race condition in tbbmalloc that may cause a crash in realloc() when using tbbmalloc_proxy.
|
||||
- Enabled GCC* 11 support.
|
||||
- Fixed limiter_node behavior when an integral type is used as an argument for the DecrementType template parameter.
|
||||
- Fixed a possible memory leak when the static or affinity partitioners are used.
|
||||
- Fixed possible system oversubscription when using a process mask and an explicit number of threads in the task arena.
|
||||
|
||||
## :octocat: Open-Source Contributions Integrated
|
||||
- Enabled PowerPC* Linux* OS support. Contributed by Mircho Rodozov (https://github.com/oneapi-src/oneTBB/pull/461)
|
||||
- Improved UNIX* system support and enabled QNX Neutrino* RTOS support. Contributed by Pablo Romero (https://github.com/oneapi-src/oneTBB/pull/440)
|
||||
- Enabled experimental Bazel* build system support. Contributed by Julian Amann (https://github.com/oneapi-src/oneTBB/pull/442)
|
||||
- Enabled oneTBB build for Windows* OS on ARM64*. Contributed by Michael Vitrano (https://github.com/oneapi-src/oneTBB/pull/507)
|
||||
- Added MinGW* and export attributes support. Contributed by Long Nguyen (https://github.com/oneapi-src/oneTBB/pull/351)
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
# Security Policy
|
||||
As an open-source project, we understand the importance of and responsibility
|
||||
for security. This Security Policy outlines our guidelines and procedures to
|
||||
ensure the highest level of security and trust for oneTBB users.
|
||||
|
||||
## Supported Versions
|
||||
Security vulnerabilities are fixed in the [latest version][1]
|
||||
and delivered as a patch release. We don't guarantee security fixes to be
|
||||
back-ported to older oneTBB versions.
|
||||
|
||||
## Report a Vulnerability
|
||||
We are very grateful to the security researchers and users that report back
|
||||
security vulnerabilities. We investigate every report thoroughly.
|
||||
We strongly encourage you to report security vulnerabilities to us privately,
|
||||
before disclosing them on public forums or opening a public GitHub* issue.
|
||||
|
||||
Report a vulnerability to us in one of two ways:
|
||||
* Open a draft **[GitHub* Security Advisory][2]**
|
||||
* Send an e-mail to: **security@uxlfoundation.org**.
|
||||
Along with the report, provide the following info:
|
||||
* A descriptive title.
|
||||
* Your name and affiliation (if any).
|
||||
* A description of the technical details of the vulnerabilities.
|
||||
* A minimal example of the vulnerability so we can reproduce your findings.
|
||||
* An explanation of who can exploit this vulnerability, and what they gain
|
||||
doing so.
|
||||
* Whether this vulnerability is public or known to third parties. If it is,
|
||||
provide details.
|
||||
|
||||
### When Should I Report a Vulnerability?
|
||||
* You think you discovered a potential security vulnerability in oneTBB.
|
||||
* You are unsure how the potential vulnerability affects oneTBB.
|
||||
* You think you discovered a vulnerability in another project or 3rd party
|
||||
component on which oneTBB depends. If the issue is not fixed in the 3rd party
|
||||
component, try to report directly there first.
|
||||
|
||||
### When Should I NOT Report a Vulnerability?
|
||||
* You got an automated scan hit and are unable to provide details.
|
||||
* You need help using oneTBB for security.
|
||||
* You need help applying security-related updates.
|
||||
* Your issue is not security-related.
|
||||
|
||||
## Security Reports Review Process
|
||||
We aim to respond quickly to your inquiry and coordinate a fix and
|
||||
disclosure with you. All confirmed security vulnerabilities will be addressed
|
||||
according to severity level and impact on oneTBB. Normally, security issues
|
||||
are fixed in the next planned release.
|
||||
|
||||
## Disclosure Policy
|
||||
We will publish security advisories using the
|
||||
[**GitHub Security Advisories feature**][3]
|
||||
to keep our community well-informed, and will credit you for your findings
|
||||
unless you prefer to stay anonymous. We request that you refrain from
|
||||
exploiting the vulnerability or making it public before the official disclosure.
|
||||
|
||||
We will disclose the vulnerabilities and bugs as soon as possible once
|
||||
mitigation is implemented and available.
|
||||
|
||||
## Feedback on This Policy
|
||||
If you have any suggestions on how this Policy could be improved, submit
|
||||
an issue or a pull request to this repository. **Do not** report
|
||||
potential vulnerabilities or security flaws via a pull request.
|
||||
|
||||
[1]: https://github.com/uxlfoundation/oneTBB/releases/latest
|
||||
[2]: https://github.com/uxlfoundation/oneTBB/security/advisories/new
|
||||
[3]: https://github.com/uxlfoundation/oneTBB/security/advisories
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<!--
|
||||
******************************************************************************
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/-->
|
||||
|
||||
# oneTBB Support
|
||||
|
||||
We are committed to providing support and assistance to help you make the most out of oneTBB.
|
||||
Use the following methods if you face any challenges.
|
||||
|
||||
## Issues
|
||||
|
||||
If you have a problem, check out the [GitHub Issues](https://github.com/uxlfoundation/oneTBB/issues) to see if the issue you want to address is already reported.
|
||||
You may find users that have encountered the same bug or have similar ideas for changes or updates.
|
||||
|
||||
You can use issues to report a problem, make a feature request, or add comments on an existing issue.
|
||||
|
||||
## Discussions
|
||||
|
||||
Visit the [GitHub Discussions](https://github.com/uxlfoundation/oneTBB/discussions) to engage with the community, ask questions, or help others.
|
||||
|
||||
## Email
|
||||
|
||||
Reach out to us privately via [email](mailto:inteltbbdevelopers@intel.com).
|
||||
+44
-21
@@ -21,45 +21,68 @@ This document provides details about hardware, operating system, and software pr
|
||||
- [Supported Hardware](#supported-hardware)
|
||||
- [Software](#software)
|
||||
- [Supported Operating Systems](#supported-operating-systems)
|
||||
- [Community-Supported Platforms](#community-supported-platforms)
|
||||
- [Supported Compilers](#supported-compilers)
|
||||
- [Limitations](#limitations)
|
||||
|
||||
|
||||
## Supported Hardware
|
||||
- Intel(R) Celeron(R) processor family
|
||||
- Intel(R) Core* processor family
|
||||
- Intel(R) Xeon(R) processor family
|
||||
- Intel(R) Xeon Phi* processor family
|
||||
- Intel(R) Atom* processor family
|
||||
- Non-Intel(R) processors compatible with the processors listed above
|
||||
|
||||
Changes to the list of supported hardware will be announced in advance with a deprecation period preceding removal or reduction of support.
|
||||
|
||||
## Software
|
||||
|
||||
### Supported Operating Systems
|
||||
- Systems with Microsoft* Windows* operating systems
|
||||
- Systems with Microsoft* Windows* operating systems:
|
||||
- Microsoft* Windows* 10
|
||||
- Microsoft* Windows* Server 2016
|
||||
- Microsoft* Windows* 11
|
||||
- Microsoft* Windows* Server 2019
|
||||
- Systems with Linux* operating systems
|
||||
- Clear Linux*
|
||||
- Amazon* Linux 2
|
||||
- CentOS* 8
|
||||
- Debian* 10
|
||||
- Fedora* 34
|
||||
- Red Hat* Enterprise Linux* 7, 8
|
||||
- SuSE* Linux* Enterprise Server 15
|
||||
- Ubuntu* 18.04 LTS, 20.04, 21.04
|
||||
- Systems with macOS* operating systems
|
||||
- macOS* 10.15, 11.x
|
||||
- Systems with Android* operating systems
|
||||
- Microsoft* Windows* Server 2022
|
||||
- Microsoft* Windows* Server 2025
|
||||
- Systems with Linux* operating systems:
|
||||
- Amazon* Linux 2023
|
||||
- Debian* 12, 13
|
||||
- Fedora* 43, 44
|
||||
- Rocky* Linux* 9, 10
|
||||
- Red Hat* Enterprise Linux* 8, 9, 10
|
||||
- SuSE* Linux* Enterprise Server 15 SP6 and SP7
|
||||
- SuSE* Linux* Enterprise Server 16
|
||||
- Ubuntu* 24.04, 26.04
|
||||
- Systems with macOS* operating systems:
|
||||
- macOS* 12.x, 13.x, 14.x, 15.x
|
||||
- Systems with Android* operating systems:
|
||||
- Android* 9
|
||||
|
||||
### Community-Supported Platforms
|
||||
- MinGW*
|
||||
- FreeBSD*
|
||||
- Microsoft* Windows* on ARM*/ARM64*
|
||||
- macOS* on ARM64*
|
||||
|
||||
### Supported Compilers
|
||||
- Intel* oneAPI DPC++/C++ Compiler
|
||||
- Intel* C++ Compiler 19.0 and 19.1 version
|
||||
- Microsoft* Visual C++ 14.1 (Microsoft* Visual Studio* 2017, Windows* OS only)
|
||||
- Microsoft* Visual C++ 14.2 (Microsoft* Visual Studio* 2019, Windows* OS only)
|
||||
- For each supported Linux* operating system, the standard gcc version provided with that operating system is supported
|
||||
- GNU Compilers (gcc) 4.8.5 - 11.1.1
|
||||
- GNU C Library (glibc) version 2.17 - 2.33
|
||||
- Clang* 6.0.0 - 12.0.0
|
||||
- Microsoft* Visual C++ 14.3 (Microsoft* Visual Studio* 2022, Windows* OS only)
|
||||
- Microsoft* Visual C++ 14.5 (Microsoft* Visual Studio* 2026, Windows* OS only)
|
||||
- For each supported Linux* operating system, the standard gcc version provided with that operating system is supported:
|
||||
- GNU Compilers (gcc) 8.x – 16.x
|
||||
- GNU C Library (glibc) version 2.28 – 2.43
|
||||
- Clang* 7.x - 22.x
|
||||
|
||||
## Limitations
|
||||
There are some cases where we cannot provide support for your platforms. It includes:
|
||||
|
||||
1. The platform is out of official support (met end of life). When you use an unsupported platform, you can face a security risk that can be difficult to resolve.
|
||||
2. We do not have the infrastructure to test a platform. Therefore we cannot guarantee that oneTBB works correctly on that platform.
|
||||
3. Changes affect more code than just platform-specific macros.
|
||||
4. The platform is incompatible with oneTBB. Some platforms may have limitations that prevent oneTBB from working correctly. We cannot provide support in these cases as the issue is beyond our control.
|
||||
5. The platform is modified or customized. If you made significant updates to your platform, it might be hard for us to find the root cause of the issue. Therefore, we may not be able to provide support as the modification could affect the oneTBB functionality.
|
||||
|
||||
|
||||
We understand that these limitations can be frustrating. Thus, we suggest creating a branch specifically for the unsupported platform, allowing other users to contribute to or use your implementation.
|
||||
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
# oneTBB Versioning Policies
|
||||
|
||||
There are several types of "versioning" used by the oneTBB project.
|
||||
|
||||
1. The *oneTBB specification version*
|
||||
2. The *official oneTBB library version*
|
||||
3. The *library interface version*
|
||||
4. *API versioning* used to maintain backwards compatibility
|
||||
|
||||
The oneTBB project uses semantic versioning (https://semver.org/) and as a oneAPI Library,
|
||||
the oneTBB project makes commitments around compatibility as described
|
||||
[here](https://www.intel.com/content/www/us/en/docs/oneapi/programming-guide/2024-1/oneapi-library-compatibility.html).
|
||||
With semantic versioning, a MAJOR version increment generally means an incompatible API change,
|
||||
while a MINOR version increment means added functionality that is implemented in a backwards compatible manner.
|
||||
|
||||
## The oneTBB Specification Version
|
||||
|
||||
The oneTBB project is governed by the [UXL foundation](https://uxlfoundation.org/) and has
|
||||
[an open specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/nested-index).
|
||||
Each release of the specification has a version number.
|
||||
|
||||
[As described in the specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/configuration/version_information),
|
||||
the value of the `ONETBB_SPEC_VERSION` macro in `oneapi/tbb/version.h` is latest specification of oneTBB fully
|
||||
supported by the implementation.
|
||||
|
||||
## The oneTBB Library Version
|
||||
|
||||
The oneTBB library version can be thought of as the name of the release. If you want to find a specific
|
||||
release in the repository (https://github.com/uxlfoundation/oneTBB), the tag you would look for corresponds
|
||||
to the oneTBB library version.
|
||||
|
||||
[As described in the specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/configuration/version_information),
|
||||
the macros `TBB_VERSION_MAJOR`, `TBB_VERSION_MINOR`, `TBB_VERSION_STRING` in `oneapi/tbb/version.h`
|
||||
provide the library version of the implementation that is being compiled against. The function
|
||||
`const char* TBB_runtime_version();` can be used to query the library version of the oneTBB binary library that is
|
||||
loaded at runtime.
|
||||
|
||||
## The oneTBB Interface Version
|
||||
|
||||
The oneTBB interface version is the public contract about the interface to the library including the
|
||||
functions exported by the binary library and the types defined in the headers. The oneTBB library is designed
|
||||
for backwards compatibility. It works well in the scenarios where components compile/link against a TBB version
|
||||
X.Y. And then at runtime, the application loads a library version X.Z, where X.Z >= X.Y.
|
||||
|
||||
A minor version may add new functionality in the headers or in the binary library, including new entry points to the
|
||||
binary library. An application compiled against an older minor version could not have used this new functionality
|
||||
and therefore can safely use the newer binary library.
|
||||
|
||||
[As described in the specification](https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/configuration/version_information),
|
||||
the macros `TBB_INTERFACE_VERSION_MAJOR`, `TBB_INTERFACE_VERSION_MINOR`, `TBB_INTERFACE_VERSION` in `oneapi/tbb/version.h`
|
||||
can be used to determine the interface version of the implementation that is being compiled against. The function
|
||||
`int TBB_runtime_interface_version();` can be used to query the interface version of the oneTBB binary library that is
|
||||
loaded at runtime.
|
||||
|
||||
### Shared Library Practices for Linux
|
||||
|
||||
On Linux we use a symlink system for binary libraries in the oneTBB distribution, and also explicitly set a soname.
|
||||
The actual shared library is libtbb.so.X.Y but it is built with a –soname that uses only the major version number,
|
||||
libtbb.so.X. In addition, there is a symlink from libtbb.so.X -> libtbb.so.X.Y and a symlink from
|
||||
libtbb.so -> libtbb.so.X. Therefore, whether you build against libtbb.so, libtbb.so.X or libtbb.so.X.Y, your
|
||||
application will have a dependency on libtbb.so.X.
|
||||
|
||||
A common development process is to compile and link against a library version X.Y. This creates
|
||||
a dependency on libtbb.so.X. The packaged project then redistributes a TBB shared library that
|
||||
is X.Z, where X.Z >= X.Y.
|
||||
|
||||
In the (unusual) case where the package does not redistribute a TBB library and instead depends on a version already
|
||||
available on the install platform, it is safest to build against the oldest version you expect to encounter; in the
|
||||
extreme this would be X.1. Of course, building against X.1 means no additional functionalility added in any later minor
|
||||
release can be used during the development of the application.
|
||||
|
||||
### Shared Library Practices for Windows
|
||||
|
||||
On Windows, the TBB binary library has only the major version number, tbb12.dll.
|
||||
|
||||
## API versioning used to maintain backwards compatibility
|
||||
|
||||
This section is targeted at oneTBB contributors and will likely not be of interest to users of the
|
||||
oneTBB library.
|
||||
|
||||
As mentioned previously, minor release may add new functionality, including modified definitions of classes
|
||||
in the headers or new entry points into the binary library. To safely add this new functionality in a way
|
||||
that avoids conflicts, oneTBB has namespaces for class definitions in the headers (that start with the
|
||||
letter "d") and namespaces for symbols exported by the binary runtime library (that start with the
|
||||
letter "r").
|
||||
|
||||
Below is an example of
|
||||
[a function exported](https://github.com/uxlfoundation/oneTBB/blob/45c2298727d09556a523d6aeaec84ef23872eccf/src/tbb/parallel_pipeline.cpp#L446)
|
||||
by the oneTBB runtime library:
|
||||
|
||||
namespace tbb {
|
||||
namespace detail {
|
||||
namespace r1 {
|
||||
void __TBB_EXPORTED_FUNC parallel_pipeline(d1::task_group_context& cxt,
|
||||
std::size_t max_token,
|
||||
const d1::filter_node& fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
This function is in the runtime namespace `r1` and takes `d1` versions of `task_group_context` and
|
||||
`filter_node` classes as arguments. Backward incompatible changes added to the library can be added
|
||||
to namespaces with incremented version numbers.
|
||||
|
||||
Rules for the `d` namespace include:
|
||||
|
||||
- If the layout of public class X is changed incompatibly, the “d” namespace number should be incremented.
|
||||
- If there are existing entry points using the current version of class X, the old version of X should
|
||||
be kept in the previous “d” namespace.
|
||||
|
||||
## API and ABI changes by release
|
||||
|
||||
For a detailed table of API and ABI changes across all oneTBB releases, see:
|
||||
[API and ABI Changes by Release](https://uxlfoundation.github.io/oneTBB/main/intro/api_abi_changes.html)
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
<!--
|
||||
******************************************************************************
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*******************************************************************************/-->
|
||||
|
||||
# WASM Support
|
||||
|
||||
oneTBB extends its capabilities by offering robust support for ``WASM`` (see ``Limitation`` sections).
|
||||
|
||||
``WASM`` stands for WebAssembly, a low-level binary format for executing code in web browsers.
|
||||
It is designed to be a portable target for compilers and efficient to parse and execute.
|
||||
|
||||
Using oneTBB with WASM, you can take full advantage of parallelism and concurrency while working on web-based applications, interactive websites, and a variety of other WASM-compatible platforms.
|
||||
|
||||
oneTBB offers WASM support through the integration with [Emscripten*](https://emscripten.org/docs/introducing_emscripten/index.html), a powerful toolchain for compiling C and C++ code into WASM-compatible runtimes.
|
||||
|
||||
## Build
|
||||
|
||||
**Prerequisites:** Download and install Emscripten*. See the [instructions](https://emscripten.org/docs/getting_started/downloads.html).
|
||||
|
||||
To build the system, run:
|
||||
|
||||
```
|
||||
mkdir build && cd build
|
||||
emcmake cmake .. -DCMAKE_CXX_COMPILER=em++ -DCMAKE_C_COMPILER=emcc -DTBB_STRICT=OFF -DCMAKE_CXX_FLAGS=-Wno-unused-command-line-argument -DTBB_DISABLE_HWLOC_AUTOMATIC_SEARCH=ON -DBUILD_SHARED_LIBS=OFF -DTBB_EXAMPLES=ON -DTBB_TEST=ON
|
||||
```
|
||||
To compile oneTBB without ``pthreads``, set the flag ``-DEMSCRIPTEN_WITHOUT_PTHREAD=true`` in the command above. By default, oneTBB uses the ``pthreads``.
|
||||
```
|
||||
cmake --build . <options>
|
||||
cmake --install . <options>
|
||||
```
|
||||
Where:
|
||||
|
||||
* ``emcmake`` - a tool that sets up the environment for Emscripten*.
|
||||
* ``-DCMAKE_CXX_COMPILER=em++`` - specifies the C++ compiler as Emscripten* C++ compiler.
|
||||
* ``-DCMAKE_C_COMPILER=emcc`` - specifies the C compiler as Emscripten* C compiler.
|
||||
|
||||
|
||||
> **_NOTE:_** See [CMake documentation](https://github.com/uxlfoundation/oneTBB/blob/master/cmake/README.md) to learn about other options.
|
||||
|
||||
|
||||
## Run Test
|
||||
|
||||
To run tests, use:
|
||||
|
||||
```
|
||||
ctest
|
||||
```
|
||||
|
||||
# Limitations
|
||||
|
||||
You can successfully build your application with oneTBB using WASM, but you may not achieve optimal performance immediately. This is due to the limitation with nested Web Workers: a Web Worker cannot schedule another worker without help from a browser thread. This can lead to unexpected performance outcomes, such as the application running in serial.
|
||||
Find more information in the [issue](https://github.com/emscripten-core/emscripten/discussions/21963) in the Emscripten repository.
|
||||
To workaround this issue, try one of the following ways:
|
||||
1. **Recommended Solution: Use the ``-sPROXY_TO_PTHREAD`` Flag**.
|
||||
This flag splits the initial thread into a browser thread and a main thread (proxied by a Web Worker), effectively resolving the issue as the browser thread is always present in the event loop and can participate in Web Workers scheduling. Refer to the [Emscripten documentation](https://emscripten.org/docs/porting/pthreads.html) for more details about ``-sPROXY_TO_PTHREAD`` since using this flag may require refactoring the code.
|
||||
2. **Alternative Solution: Warm Up the oneTBB Thread Pool**
|
||||
Initialize the oneTBB thread pool before making the first call to oneTBB. This approach forces the browser thread to participate in Web Workers scheduling.
|
||||
```cpp
|
||||
int num_threads = tbb::this_task_arena::max_concurrency();
|
||||
std::atomic<int> barrier{num_threads};
|
||||
tbb::parallel_for(0, num_threads, [&barrier] (int) {
|
||||
barrier--;
|
||||
while (barrier > 0) {
|
||||
// Send browser thread to event loop
|
||||
std::this_thread::yield();
|
||||
}
|
||||
}, tbb::static_partitioner{});
|
||||
```
|
||||
> **_NOTE:_** Be aware that it might cause delays on the browser side.
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021 Intel Corporation
|
||||
# Copyright (c) 2021-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -13,7 +13,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
# DISCLAIMER: Bazel support is community-based. The maintainers do not
|
||||
# use Bazel internally. The Bazel build can have security risks or
|
||||
# use Bazel internally. The Bazel build can have security risks or
|
||||
# optimization gaps.
|
||||
|
||||
workspace(name = "oneTBB")
|
||||
# WORKSPACE marker file needed by Bazel
|
||||
|
||||
+174
-61
@@ -1,30 +1,42 @@
|
||||
# Build system description
|
||||
# Build System Description
|
||||
|
||||
The project uses CMake build configuration.
|
||||
The project uses CMake* build configuration.
|
||||
|
||||
The following controls are available during the configure stage:
|
||||
```
|
||||
TBB_TEST:BOOL - Enable testing (ON by default)
|
||||
TBB_EXAMPLES:BOOL - Enable build of TBB examples (OFF by default)
|
||||
TBB_STRICT:BOOL - Treat compiler warnings as errors (ON by default)
|
||||
TBB_SANITIZE:STRING - Sanitizer parameter, passed to compiler/linker
|
||||
TBB_SIGNTOOL:FILEPATH - Tool for digital signing, used in post install step for libraries if provided.
|
||||
TBB_SIGNTOOL:FILEPATH - Tool for digital signing, used in post-install step for libraries if provided.
|
||||
TBB_SIGNTOOL_ARGS:STRING - Additional arguments for TBB_SIGNTOOL, used if TBB_SIGNTOOL is set.
|
||||
BUILD_SHARED_LIBS:BOOL - Standard CMake variable controlling whether oneTBB is built as shared libraries (ON by default).
|
||||
Setting it to OFF produces static archives; this configuration is highly discouraged and is not
|
||||
supported. See "Building oneTBB as a Static Library" below.
|
||||
TBB_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) build (ON by default)
|
||||
TBB_FIND_PACKAGE - Enable search for external oneTBB using find_package instead of build from sources (OFF by default)
|
||||
TBBMALLOC_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator build (ON by default)
|
||||
TBBMALLOC_PROXY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator proxy build (requires TBBMALLOC_BUILD. ON by default)
|
||||
TBB4PY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) Python module build (OFF by default)
|
||||
TBB_CPF:BOOL - Enable preview features of the library (OFF by default)
|
||||
TBB_INSTALL:BOOL - Enable installation (ON by default)
|
||||
TBB_INSTALL_VARS:BOOL - Enable auto-generated vars installation(packages generated by `cpack` and `make install` will also include the vars script)(OFF by default)
|
||||
TBB_VALGRIND_MEMCHECK:BOOL - Enable scan for memory leaks using Valgrind (OFF by default)
|
||||
TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH - Disable HWLOC automatic search by pkg-config tool (OFF by default)
|
||||
TBB_ENABLE_IPO - Enable Interprocedural Optimization (IPO) during the compilation (ON by default)
|
||||
TBB_CONTROL_FLOW_GUARD:BOOL - Enable Control Flow Guard (CFG) during the compilation (OFF by default)
|
||||
TBB_BUILD_APPLE_FRAMEWORKS - Enable the Apple* frameworks instead of dylibs, only available on the Apple platform. (OFF by default)
|
||||
TBB_FILE_TRIM - Enable __FILE__ trim, replace a build-time full path with a relative path in the debug info and macro __FILE__; use it to make
|
||||
reproducible location-independent builds (ON by default)
|
||||
TBB_VERIFY_DEPENDENCY_SIGNATURE - On Windows* enable verification of signatures for dependencies linked at run-time. (ON by default)
|
||||
TBB_FUZZ_TESTING:BOOL - Enable fuzz testing (OFF by default)
|
||||
TCM_BUILD - Enable Thread Composability Manager (TCM) build (ON by default)
|
||||
```
|
||||
|
||||
## Configure, build, and test
|
||||
## Configure, Build, and Test
|
||||
|
||||
### Preparation
|
||||
|
||||
To perform out-of-source build, create a build directory and go there:
|
||||
To perform an out-of-source build, create a build directory and go there:
|
||||
|
||||
```bash
|
||||
mkdir /tmp/my-build
|
||||
@@ -39,14 +51,16 @@ cmake <options> <repo_root>
|
||||
|
||||
Some useful options:
|
||||
- `-G <generator>` - specify particular project generator. See `cmake --help` for details.
|
||||
- `-DCMAKE_BUILD_TYPE=Debug` - specify for Debug build. It is not applicable for multiconfig generators, e.g. for Visual Studio* generator.
|
||||
- `-DCMAKE_BUILD_TYPE=Debug` - specify for Debug build. It is not applicable for multi-config generators, e.g., Microsoft* Visual Studio* generator.
|
||||
|
||||
#### TBBBind library configuration
|
||||
#### TBBBind Library Configuration
|
||||
|
||||
The TBBbind library has three versions: `tbbbind`, `tbbbind_2_0`, and `tbbbind_2_5`. Each of these versions is linked with corresponding HWLOC library version:
|
||||
- `tbbbind` links with HWLOC 1.11.x
|
||||
- `tbbbind_2_0` links with HWLOC 2.1–2.4
|
||||
- `tbbbind_2_5` links with HWLOC 2.5 and later
|
||||
> **_TIP:_** It is recommended to install the HWLOC* library. See [oneTBB documentation](https://uxlfoundation.github.io/oneTBB/GSG/next_steps.html#hybrid-cpu-and-numa-support) for details.
|
||||
|
||||
The TBBbind library has three versions: `tbbbind`, `tbbbind_2_0`, and `tbbbind_2_5`. Each of these versions is linked with the corresponding HWLOC* library version:
|
||||
- `tbbbind` links with `HWLOC 2.x` which was built as an archive library on Linux* (.a file) or a static library on Windows* (.lib file)
|
||||
- `tbbbind_2_0` links with `HWLOC 2.1–2.4`
|
||||
- `tbbbind_2_5` links with `HWLOC 2.5` and later
|
||||
|
||||
The search for a suitable version of the HWLOC library is enabled by default. If you want to use a specific version of the library, you can specify the path to it manually using the following CMake variables:
|
||||
|
||||
@@ -63,17 +77,17 @@ The search for a suitable version of the HWLOC library is enabled by default. If
|
||||
Windows* OS requires an additional variable for correct TBBBind library building:
|
||||
- `CMAKE_HWLOC_<HWLOC_VER>_DLL_PATH` - path to the corresponding HWLOC version `.dll` file.
|
||||
|
||||
`HWLOC_VER` substring used earlier can be replaced with one of the three values:
|
||||
- `1_11` for the `tbbbind` library configuration
|
||||
The `HWLOC_VER` substring used earlier can be replaced with one of the three values:
|
||||
- `STATIC` for the `tbbbind` library configuration
|
||||
- `2` for the `tbbbind_2_0` library configuration
|
||||
- `2_5` for the `tbbbind_2_5` library configuration
|
||||
|
||||
If you specify variables for several TBBBind versions, the building process for all of these versions is performed during single build session.
|
||||
If you specify variables for several TBBBind versions, the building process for all of these versions is performed during a single build session.
|
||||
|
||||
---
|
||||
**TIP**
|
||||
|
||||
Specify the `TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH` to disable HWLOC libraries automatic search.
|
||||
Specify the `TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH` to turn off the HWLOC library's automatic search.
|
||||
|
||||
---
|
||||
|
||||
@@ -85,24 +99,24 @@ cmake --build . <options>
|
||||
```
|
||||
|
||||
Some useful options:
|
||||
- `--target <target>` - specific target, "all" is default.
|
||||
- `--config <Release|Debug>` - build configuration, applicable only for multiconfig generators, e.g. Visual Studio* generator.
|
||||
- `--target <target>` - specific target, "all" is the default.
|
||||
- `--config <Release|Debug>` - build configuration, applicable only for multi-config generators, e.g., Visual Studio* generator.
|
||||
|
||||
The binaries are placed to `./<compiler-id>_<compiler-ver>_cxx<stdver>_<build-type>`. For example, `./gnu_4.8_cxx11_release`.
|
||||
|
||||
#### Build for 32-bit
|
||||
#### Build For 32-bit
|
||||
|
||||
* **Intel(R) Compiler**. Source Intel(R) C++ Compiler with `ia32` and build as usual.
|
||||
* **MSVC**. Use switch for [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) (e.g. `-A Win32` for [VS2019](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html)) during the configuration stage and then build as usual.
|
||||
* **MSVC**. Use switch for [generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) (e.g., `-A Win32` for [VS2019](https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2016%202019.html)) during the configuration stage and then build as usual.
|
||||
* **GCC/Clang**. Specify `-m32` during the configuration. It can be `CXXFLAGS=-m32 cmake ..` or `cmake -DCMAKE_CXX_FLAGS=-m32 ..`
|
||||
* For any other compiler, which builds for 64-bit by default, specify 32-bit compiler key during the configuration as above.
|
||||
* For any other compiler, which builds for 64-bit by default, specify a 32-bit compiler key during the configuration as above.
|
||||
|
||||
#### Windows* OS specific builds
|
||||
#### Windows* OS-Specific Builds
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
Following builds require CMake version 3.15 or higher.
|
||||
The following builds require CMake version 3.15 or higher.
|
||||
|
||||
---
|
||||
|
||||
@@ -123,12 +137,12 @@ cmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ..
|
||||
```bash
|
||||
cmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DCMAKE_BUILD_TYPE=Debug ..
|
||||
```
|
||||
* **Windows* OS 10 Universal Windows application build**. Set `CMAKE_SYSTEM_NAME` to `WindowsStore` and `CMAKE_SYSTEM_VERSION` to `10.0`.
|
||||
* **Windows OS 10 Universal Windows application build**. Set `CMAKE_SYSTEM_NAME` to `WindowsStore` and `CMAKE_SYSTEM_VERSION` to `10.0`.
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
Set `TBB_NO_APPCONTAINER` to `ON` in order to apply `/APPCONTAINER:NO` option during the compilation (used for testing).
|
||||
Set `TBB_NO_APPCONTAINER` to `ON` to apply the `/APPCONTAINER:NO` option during the compilation (used for testing).
|
||||
|
||||
---
|
||||
|
||||
@@ -136,16 +150,31 @@ Set `TBB_NO_APPCONTAINER` to `ON` in order to apply `/APPCONTAINER:NO` option du
|
||||
cmake -DCMAKE_SYSTEM_NAME:STRING=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING=10.0 ..
|
||||
```
|
||||
|
||||
* **Universal Windows* OS Driver build**. Set `TBB_WINDOWS_DRIVER` to `ON` and use static linkage with CRT.
|
||||
* **Universal Windows OS Driver build**. Set `TBB_WINDOWS_DRIVER` to `ON` and use static linkage with CRT.
|
||||
|
||||
```bash
|
||||
cmake -DTBB_WINDOWS_DRIVER=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ..
|
||||
```
|
||||
|
||||
#### Example
|
||||
|
||||
```bash
|
||||
cmake -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_COMPILER=icx -DTBB_TEST=off -DCMAKE_HWLOC_2_5_LIBRARY_PATH=<path_to_hwloc_library_file>/libhwloc.so.15
|
||||
-DCMAKE_HWLOC_2_5_INCLUDE_PATH=<path_to_hwloc_header_directory> -DCMAKE_INSTALL_PREFIX=<path_to_install_oneTBB>/oneTBB_install ..
|
||||
make -j8 && make install
|
||||
```
|
||||
|
||||
---
|
||||
**NOTE**
|
||||
|
||||
The library path points to a file, while the include path points to a directory and not to ``hwloc.h``.
|
||||
|
||||
---
|
||||
|
||||
### Test
|
||||
|
||||
#### Build test
|
||||
To build a test, use the default target 'all':
|
||||
To build a test, use the default target ``all``:
|
||||
```
|
||||
cmake --build .
|
||||
```
|
||||
@@ -155,22 +184,106 @@ Or use a specific test target:
|
||||
cmake --build . --target <test> # e.g. test_version
|
||||
```
|
||||
|
||||
#### Run test
|
||||
#### Run Test
|
||||
|
||||
You can run a test by using CTest:
|
||||
```bash
|
||||
ctest
|
||||
```
|
||||
|
||||
Or by using 'test' target:
|
||||
Or by using the ``test`` target:
|
||||
```bash
|
||||
cmake --build . --target test # currently does not work on Windows* OS
|
||||
```
|
||||
|
||||
## Installation
|
||||
See [Installation from Sources](../INSTALL.md) to learn how to install oneTBB.
|
||||
|
||||
## Sanitizers - сonfigure, build, and run
|
||||
## Building oneTBB as a Static Library
|
||||
|
||||
---
|
||||
**CAUTION**
|
||||
|
||||
Static linking of oneTBB is highly discouraged and has limited support.
|
||||
|
||||
---
|
||||
**IMPORTANT**
|
||||
|
||||
oneTBB manages a resource that is owned by the whole program - the machine's hardware threads - so its task scheduler and worker thread pool are intended to be a process-wide singleton.
|
||||
|
||||
---
|
||||
|
||||
See [Static Linking of oneTBB](https://uxlfoundation.github.io/oneTBB/main/intro/static_linking.html) for the rationale, the features that become unavailable, and the risks of ending up with more than one copy of oneTBB in a process. If you choose this configuration, validating your application is your responsibility.
|
||||
|
||||
oneTBB is built as a shared library by default. To build static archives instead, set `BUILD_SHARED_LIBS` to `OFF` during the configuration:
|
||||
|
||||
```bash
|
||||
mkdir build && cd build
|
||||
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=<install_dir> ..
|
||||
cmake --build . --parallel
|
||||
cmake --install .
|
||||
```
|
||||
|
||||
The configuration step prints the following warning, which is expected:
|
||||
|
||||
```
|
||||
You are building oneTBB as a static library. This is highly discouraged and such
|
||||
configuration is not supported. Consider building a dynamic library to avoid
|
||||
unforeseen issues.
|
||||
```
|
||||
|
||||
The build produces archives instead of shared libraries:
|
||||
|
||||
Platform | Release | Debug
|
||||
--- | --- | ---
|
||||
Linux* OS, macOS* | `libtbb.a`, `libtbbmalloc.a` | `libtbb_debug.a`, `libtbbmalloc_debug.a`
|
||||
Windows* OS | `tbb12.lib`, `tbbmalloc.lib` | `tbb12_debug.lib`, `tbbmalloc_debug.lib`
|
||||
|
||||
### Effects on the Build Configuration
|
||||
|
||||
Setting `BUILD_SHARED_LIBS` to `OFF` also changes the following:
|
||||
|
||||
`CMAKE_POSITION_INDEPENDENT_CODE` is set to `ON` so that the archive can be linked into a shared object.
|
||||
It is only defaulted, so an explicit value specified during the configuration is respected.
|
||||
|
||||
The `tbbbind` proxy libraries are loaded at run time, which a static build does not support, so they
|
||||
are skipped and the configuration step reports `TBBBind build targets are disabled due to
|
||||
unsupported environment`. As a result, `tbb::info` and `tbb::task_arena::constraints` cannot
|
||||
report or apply topology-based constraints. See [TBBBind Library Configuration](#tbbbind-library-configuration).
|
||||
|
||||
`tbbmalloc_proxy` is not built even though `TBBMALLOC_PROXY_BUILD` is `ON` by default.
|
||||
The proxy replaces the memory allocation functions of the C library, which requires a
|
||||
shared library. The scalable allocator is still available through the explicit interfaces,
|
||||
such as `tbb::scalable_allocator` and `scalable_malloc`.
|
||||
|
||||
oneTBB loads the TCM library dynamically, so a static build cannot coordinate with
|
||||
other threading runtimes through it, regardless of `TCM_BUILD` or the `TCM_ENABLE`
|
||||
environment variable.
|
||||
|
||||
IPO is applied only to shared library builds, so `TBB_ENABLE_IPO=ON` has no effect and a
|
||||
static oneTBB may be marginally slower than the shared one.
|
||||
|
||||
On Windows* OS, `BUILD_SHARED_LIBS` controls how oneTBB itself is linked, not how oneTBB
|
||||
links the CRT. To link the CRT statically as well, set `CMAKE_MSVC_RUNTIME_LIBRARY`.
|
||||
See [Windows* OS-Specific Builds](#windows-os-specific-builds).
|
||||
|
||||
### Consuming a Static Build
|
||||
|
||||
Consuming a static build works the same way as a shared one. The generated `TBBConfig.cmake` adds a `Threads` dependency for static builds, so the platform thread library is linked transitively:
|
||||
|
||||
```cmake
|
||||
find_package(TBB REQUIRED)
|
||||
target_link_libraries(my_app PRIVATE TBB::tbb)
|
||||
```
|
||||
|
||||
See [TBBConfig - Integration of Binary Packages](#tbbconfig---integration-of-binary-packages) for details about the configuration module.
|
||||
|
||||
---
|
||||
**WARNING**
|
||||
|
||||
Static builds receive only light validation coverage. The tests that depend on HWLOC or on `tbbmalloc_proxy` are excluded automatically, so a passing `ctest` run does not indicate the same coverage as it does for a shared build.
|
||||
|
||||
---
|
||||
|
||||
## Sanitizers - Configure, Build, and Run
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
@@ -180,7 +293,7 @@ make -j
|
||||
ctest -V
|
||||
```
|
||||
|
||||
## Valgrind memcheck - configure, build, and run
|
||||
## Valgrind Memcheck - Configure, Build, and Run
|
||||
|
||||
### Prerequisites
|
||||
* Valgrind tool executable
|
||||
@@ -192,9 +305,9 @@ cmake -DTBB_VALGRIND_MEMCHECK=ON ..
|
||||
make -j memcheck-<test name> # or memcheck-all to scan all tests
|
||||
```
|
||||
|
||||
## Test specification
|
||||
## Test Specification
|
||||
|
||||
Use Doxygen to generate oneTBB test specification:
|
||||
Use Doxygen* to generate oneTBB test specification:
|
||||
|
||||
```bash
|
||||
mkdir build
|
||||
@@ -203,12 +316,12 @@ cmake -DTBB_TEST_SPEC=ON ..
|
||||
make test_spec
|
||||
```
|
||||
|
||||
## TBBConfig - integration of binary packages
|
||||
## TBBConfig - Integration of Binary Packages
|
||||
|
||||
It is a configuration module that is used for integration of prebuilt oneTBB. It consists of two files (TBBConfig.cmake and TBBConfigVersion.cmake) and can be used via [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) function.
|
||||
It is a configuration module that is used for the integration of prebuilt oneTBB. It consists of two files (``TBBConfig.cmake`` and ``TBBConfigVersion.cmake``) and can be used via the [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) function.
|
||||
|
||||
How to use this module in your CMake project:
|
||||
1. Let CMake know where to search for TBBConfig, e.g. specify location of TBBConfig.cmake in `TBB_DIR` (for more details about search paths see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)).
|
||||
To use this module in your CMake project:
|
||||
1. Let CMake know where to search for TBBConfig, e.g. specify the location of ``TBBConfig.cmake`` in `TBB_DIR` (for more details about search paths, see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)).
|
||||
2. Use [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to find oneTBB.
|
||||
3. Use provided variables and/or imported targets (described below) to work with the found oneTBB.
|
||||
|
||||
@@ -223,14 +336,14 @@ target_link_libraries(foo TBB::tbb)
|
||||
oneTBB components can be passed to [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) after keyword ``COMPONENTS`` or ``REQUIRED``.
|
||||
Use basic names of components (`tbb`, `tbbmalloc`, etc.).
|
||||
|
||||
If components are not specified then the default set is used: `tbb`, `tbbmalloc` and ``tbbmalloc_proxy``.
|
||||
If components are not specified, then the default set is used: `tbb`, `tbbmalloc`, and ``tbbmalloc_proxy``.
|
||||
|
||||
If `tbbmalloc_proxy` is requested, `tbbmalloc` component will also be added and set as dependency for `tbbmalloc_proxy`.
|
||||
If `tbbmalloc_proxy` is requested, the `tbbmalloc` component is also added and set as a dependency for `tbbmalloc_proxy`.
|
||||
|
||||
TBBConfig creates [imported targets](https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#imported-targets>) as
|
||||
shared libraries using the following format: `TBB::<component>` (for example, `TBB::tbb`, `TBB::tbbmalloc`).
|
||||
shared libraries using the following format: `TBB::<component>`. For example, `TBB::tbb` or `TBB::tbbmalloc`.
|
||||
|
||||
Set `TBB_FIND_RELEASE_ONLY` to `TRUE` before calling `find_package` in order to search only for release oneTBB version. This variable helps to avoid simultaneous linkage of release and debug oneTBB versions when CMake configuration is `Debug` but a third-party component depends on release oneTBB version.
|
||||
To search only for release oneTBB version, set `TBB_FIND_RELEASE_ONLY` to `TRUE` before calling `find_package`. This variable helps to avoid simultaneous linkage of release and debug oneTBB versions when CMake configuration is `Debug,` but a third-party component depends on the release oneTBB version.
|
||||
|
||||
Variables set during TBB configuration:
|
||||
|
||||
@@ -241,14 +354,14 @@ Variable | Description
|
||||
`TBB_VERSION` | oneTBB version (format: `<major>.<minor>.<patch>.<tweak>`)
|
||||
`TBB_IMPORTED_TARGETS` | All created oneTBB imported targets (not supported for builds from source code)
|
||||
|
||||
Starting from [oneTBB 2021.1](https://github.com/oneapi-src/oneTBB/releases/tag/v2021.1) GitHub release TBBConfig files in the binary packages are located under `<tbb-root>/lib/cmake/TBB`.
|
||||
Starting from [oneTBB 2021.1](https://github.com/uxlfoundation/oneTBB/releases/tag/v2021.1), GitHub* release TBBConfig files in the binary packages are located under `<tbb-root>/lib/cmake/TBB`.
|
||||
For example, `TBB_DIR` should be set to `<tbb-root>/lib/cmake/TBB`.
|
||||
|
||||
TBBConfig files are automatically created during the build from source code and can be installed together with the library.
|
||||
Also oneTBB provides a helper function that creates TBBConfig files from predefined templates: see `tbb_generate_config` in `cmake/config_generation.cmake`.
|
||||
Also, oneTBB provides a helper function that creates TBBConfig files from predefined templates. See `tbb_generate_config` in `cmake/config_generation.cmake`.
|
||||
|
||||
## oneTBB Python Module support
|
||||
`TBB4PY_BUILD` Cmake option provides ability to build Python module for oneTBB.
|
||||
## oneTBB Python Module Support
|
||||
The `TBB4PY_BUILD` Cmake option provides the ability to build a Python module for oneTBB.
|
||||
|
||||
### Targets:
|
||||
- `irml` - build IPC RML server
|
||||
@@ -258,30 +371,30 @@ Also oneTBB provides a helper function that creates TBBConfig files from predefi
|
||||
- Python version 3.5 or newer
|
||||
- SWIG version 3.0.6 or newer
|
||||
|
||||
## CMake files
|
||||
## CMake Files
|
||||
|
||||
### Compile/link options
|
||||
### Compile and Link Options
|
||||
|
||||
Compile and link options may be specific for certain compilers. This part is handled in `cmake/compilers/*` files.
|
||||
|
||||
Options in TBB CMake are handled via variables in two ways for convenience:
|
||||
|
||||
* by options group
|
||||
* by specific option
|
||||
* by the specific option
|
||||
|
||||
#### Options group
|
||||
#### Options Group
|
||||
|
||||
Naming convention is the following: `TBB_<SCOPE>_<STAGE>_<CATEGORY>`, where
|
||||
Naming convention is the following: `TBB_<SCOPE>_<STAGE>_<CATEGORY>`, where:
|
||||
|
||||
* `<SCOPE>` could be
|
||||
* `<SCOPE>` can be:
|
||||
* `LIB` - options applied during libraries build.
|
||||
* `TEST` - options applied during test build.
|
||||
* `BENCH` - options applied during benchmarks build.
|
||||
* `COMMON` - options applied during all (libraries, test, benchmarks) builds.
|
||||
* `<STAGE>` could be
|
||||
* `<STAGE>` can be:
|
||||
* `COMPILE` - options applied during the compilation.
|
||||
* `LINK` - options applied during the linkage.
|
||||
* `<CATEGORY>` could be
|
||||
* `<CATEGORY>` can be:
|
||||
* `FLAGS` - list of flags
|
||||
* `LIBS` - list of libraries
|
||||
|
||||
@@ -289,17 +402,17 @@ Naming convention is the following: `TBB_<SCOPE>_<STAGE>_<CATEGORY>`, where
|
||||
|
||||
Variable | Description
|
||||
--- | ---
|
||||
`TBB_COMMON_COMPILE_FLAGS` | Applied to libraries, tests and benchmarks as compile options
|
||||
`TBB_COMMON_COMPILE_FLAGS` | Applied to libraries, tests, and benchmarks as compile options
|
||||
`TBB_LIB_LINK_FLAGS` | Applied to libraries as link options
|
||||
`TBB_LIB_LINK_LIBS ` | Applied to libraries as link libraries
|
||||
`TBB_TEST_COMPILE_FLAGS` | Applied to tests as compile options
|
||||
|
||||
Please specify the `LINK` options prefixed with dash(-) for MSVC(Visual Studio) compiler with CMake < 3.13 to avoid issues caused by `target_link_libraries` CMake command usage.
|
||||
Specify the `LINK` options prefixed with a dash(-) for MSVC(Visual Studio) compiler with CMake < 3.13 to avoid issues caused by `target_link_libraries` CMake command usage.
|
||||
|
||||
#### Specific options
|
||||
#### Specific Options
|
||||
|
||||
If the option used only in part of the places (library, tests, benchmarks) as well as adding this option to the group of other options is not possible,
|
||||
If the option is used only in part of the places (library, tests, benchmarks) and adding this option to the group of other options is not possible,
|
||||
then the option must be named using common sense.
|
||||
|
||||
Warnings supperssions should be added into `TBB_WARNING_SUPPRESS` variable which is applied during the compilation of libraries, tests and benchmarks.
|
||||
Additional warnings should be added into `TBB_WARNING_TEST_FLAGS` variable which is applied during the compilation of tests.
|
||||
Warning suppressions should be added to the `TBB_WARNING_SUPPRESS` variable, which is applied during the compilation of libraries, tests, and benchmarks.
|
||||
Additional warnings should be added to the `TBB_WARNING_TEST_FLAGS` variable, which is applied during the compilation of tests.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2022 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -42,6 +42,10 @@ if ("${_tbb_target_architectures}" MATCHES "(x86_64|amd64|AMD64)") # OSX systems
|
||||
endif()
|
||||
unset(_tbb_target_architectures)
|
||||
|
||||
if (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10 AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)
|
||||
endif ()
|
||||
|
||||
# TBB malloc settings
|
||||
set(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
# Copyright (c) 2025 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -12,6 +13,18 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
set(TBB_EMSCRIPTEN 1)
|
||||
if (NOT EMSCRIPTEN_WITHOUT_PTHREAD)
|
||||
set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "-pthread")
|
||||
endif()
|
||||
set(TBB_EMSCRIPTEN_STACK_SIZE 65536)
|
||||
set(TBB_LIB_COMPILE_FLAGS -D__TBB_EMSCRIPTEN_STACK_SIZE=${TBB_EMSCRIPTEN_STACK_SIZE})
|
||||
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -fexceptions)
|
||||
set(TBB_TEST_LINK_FLAGS ${TBB_TEST_LINK_FLAGS} -fexceptions -sINITIAL_MEMORY=65536000 -sALLOW_MEMORY_GROWTH=1 -sMALLOC=mimalloc -sEXIT_RUNTIME=1 -sTOTAL_STACK=${TBB_EMSCRIPTEN_STACK_SIZE})
|
||||
unset(TBB_EMSCRIPTEN_STACK_SIZE)
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
set(TBB_LINK_DEF_FILE_FLAG "")
|
||||
set(TBB_DEF_FILE_PREFIX "")
|
||||
@@ -25,8 +38,15 @@ elseif (MSVC)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/MSVC.cmake)
|
||||
return()
|
||||
else()
|
||||
set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)
|
||||
set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})
|
||||
# On Windows, use Windows .def file format, not Linux version-script
|
||||
if(WIN32)
|
||||
set(TBB_LINK_DEF_FILE_FLAG ${CMAKE_LINK_DEF_FILE_FLAG})
|
||||
set(TBB_DEF_FILE_PREFIX win${TBB_ARCH})
|
||||
else()
|
||||
set(TBB_LINK_DEF_FILE_FLAG -Wl,--version-script=)
|
||||
set(TBB_DEF_FILE_PREFIX lin${TBB_ARCH})
|
||||
endif()
|
||||
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},10.0>>:-ffp-model=precise>)
|
||||
endif()
|
||||
|
||||
# Depfile options (e.g. -MD) are inserted automatically in some cases.
|
||||
@@ -44,20 +64,63 @@ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
|
||||
endif()
|
||||
|
||||
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
|
||||
if (APPLE AND CMAKE_OSX_ARCHITECTURES)
|
||||
set(_tbb_target_architectures "${CMAKE_OSX_ARCHITECTURES}")
|
||||
else()
|
||||
set(_tbb_target_architectures "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
if ("${_tbb_target_architectures}" MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)
|
||||
endif()
|
||||
|
||||
# Clang flags to prevent compiler from optimizing out security checks
|
||||
# Don't use -fPIC, -fstack-clash-protection, -fcf-protection on Windows (not supported by Clang with MSVC toolchain)
|
||||
# Also disable CRT security warnings on Windows (getenv, strncpy, etc. are deprecated but TBB uses them)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS}
|
||||
-Wformat -Wformat-security -Werror=format-security
|
||||
$<$<PLATFORM_ID:Windows>:-D_CRT_SECURE_NO_WARNINGS>
|
||||
$<$<NOT:$<PLATFORM_ID:Windows>>:-fPIC>
|
||||
$<$<NOT:$<PLATFORM_ID:Emscripten>>:-fstack-protector-strong>)
|
||||
|
||||
if (NOT APPLE AND NOT ANDROID_PLATFORM AND CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT WIN32)
|
||||
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} -fstack-clash-protection)
|
||||
if (NOT EMSCRIPTEN)
|
||||
# Some versions of Clang implicitly set -march=i686 when compiling for x86 and some don't.
|
||||
# -fcf-protection requires i686, so check -fcf-protection explicitly.
|
||||
include(CheckCXXSourceCompiles)
|
||||
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
|
||||
set(CMAKE_REQUIRED_FLAGS "-fcf-protection=full")
|
||||
check_cxx_source_compiles("int main(int, char*[]) { return 0; }" CF_PROTECTION_FULL_SUPPORTED)
|
||||
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
|
||||
if (CF_PROTECTION_FULL_SUPPORTED)
|
||||
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} -fcf-protection=full)
|
||||
else()
|
||||
message(WARNING "Compiler does not support -fcf-protection=full.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# -z switch is not supported on MacOS and Windows
|
||||
if (NOT APPLE AND NOT WIN32)
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now,-z,noexecstack)
|
||||
endif()
|
||||
|
||||
set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})
|
||||
|
||||
if (ANDROID_PLATFORM)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)
|
||||
endif()
|
||||
if (NOT CMAKE_CXX_FLAGS MATCHES "_FORTIFY_SOURCE")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)
|
||||
endif ()
|
||||
|
||||
if (MINGW)
|
||||
list(APPEND TBB_COMMON_COMPILE_FLAGS -U__STRICT_ANSI__)
|
||||
endif()
|
||||
|
||||
if (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)
|
||||
endif ()
|
||||
|
||||
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
|
||||
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2020-2022 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -35,14 +36,45 @@ if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)
|
||||
set(TBB_MMD_FLAG -MMD)
|
||||
endif()
|
||||
|
||||
|
||||
# Binutils < 2.31.1 do not support the tpause instruction. When compiling with
|
||||
# a modern version of GCC (supporting it) but relying on an outdated assembler,
|
||||
# will result in an error reporting "no such instruction: tpause".
|
||||
# The following code invokes the GNU assembler to extract the version number
|
||||
# and convert it to an integer that can be used in the C++ code to compare
|
||||
# against, and conditionally disable the __TBB_WAITPKG_INTRINSICS_PRESENT
|
||||
# macro if the version is incompatible. Binutils only report the version in the
|
||||
# MAJOR.MINOR format, therefore the version checked is >=2.32 (instead of
|
||||
# >=2.31.1). Capturing the output in CMake can be done like below. The version
|
||||
# information is written to either stdout or stderr. To not make any
|
||||
# assumptions, both are captured.
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E env "LC_ALL=C" "LANG=C" ${CMAKE_CXX_COMPILER} -xc -c /dev/null -Wa,-v -o/dev/null
|
||||
OUTPUT_VARIABLE ASSEMBLER_VERSION_LINE_OUT
|
||||
ERROR_VARIABLE ASSEMBLER_VERSION_LINE_ERR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(ASSEMBLER_VERSION_LINE ${ASSEMBLER_VERSION_LINE_OUT}${ASSEMBLER_VERSION_LINE_ERR})
|
||||
if ("${ASSEMBLER_VERSION_LINE}" MATCHES "GNU assembler version")
|
||||
string(REGEX REPLACE ".*GNU assembler version ([0-9]+)\\.([0-9]+).*" "\\1" _tbb_gnu_asm_major_version "${ASSEMBLER_VERSION_LINE}")
|
||||
string(REGEX REPLACE ".*GNU assembler version ([0-9]+)\\.([0-9]+).*" "\\2" _tbb_gnu_asm_minor_version "${ASSEMBLER_VERSION_LINE}")
|
||||
unset(ASSEMBLER_VERSION_LINE_OUT)
|
||||
unset(ASSEMBLER_VERSION_LINE_ERR)
|
||||
unset(ASSEMBLER_VERSION_LINE)
|
||||
message(TRACE "Extracted GNU assembler version: major=${_tbb_gnu_asm_major_version} minor=${_tbb_gnu_asm_minor_version}")
|
||||
|
||||
math(EXPR _tbb_gnu_asm_version_number "${_tbb_gnu_asm_major_version} * 1000 + ${_tbb_gnu_asm_minor_version}")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} "-D__TBB_GNU_ASM_VERSION=${_tbb_gnu_asm_version_number}")
|
||||
message(STATUS "GNU Assembler version: ${_tbb_gnu_asm_major_version}.${_tbb_gnu_asm_minor_version} (${_tbb_gnu_asm_version_number})")
|
||||
endif()
|
||||
|
||||
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>)
|
||||
endif()
|
||||
|
||||
if (NOT MINGW)
|
||||
set(TBB_COMMON_LINK_LIBS dl)
|
||||
endif()
|
||||
set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})
|
||||
|
||||
# Ignore -Werror set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
|
||||
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
|
||||
@@ -52,6 +84,10 @@ endif()
|
||||
if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL Intel)
|
||||
# gcc 6.0 and later have -flifetime-dse option that controls elimination of stores done outside the object lifetime
|
||||
set(TBB_DSE_FLAG $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},6.0>>:-flifetime-dse=1>)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
|
||||
|
||||
# Suppress GCC 12.x-15.x warning here that to_wait_node(n)->my_is_in_list might have size 0
|
||||
set(TBB_COMMON_LINK_FLAGS ${TBB_COMMON_LINK_FLAGS} $<$<AND:$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>,$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},16.0>>:-Wno-stringop-overflow>)
|
||||
endif()
|
||||
|
||||
# Workaround for heavy tests and too many symbols in debug (rellocation truncated to fit: R_MIPS_CALL16)
|
||||
@@ -68,6 +104,27 @@ if (MINGW AND CMAKE_SYSTEM_PROCESSOR MATCHES "i.86")
|
||||
list (APPEND TBB_COMMON_COMPILE_FLAGS -msse2)
|
||||
endif ()
|
||||
|
||||
# Gnu flags to prevent compiler from optimizing out security checks
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security
|
||||
-fstack-protector-strong )
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)" AND NOT EMSCRIPTEN)
|
||||
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fcf-protection=full>)
|
||||
endif ()
|
||||
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},8.0>>:-fstack-clash-protection>)
|
||||
|
||||
# -z switch is not supported on MacOS and MinGW
|
||||
if (NOT APPLE AND NOT MINGW)
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now,-z,noexecstack)
|
||||
endif()
|
||||
if (NOT CMAKE_CXX_FLAGS MATCHES "_FORTIFY_SOURCE")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2> )
|
||||
endif ()
|
||||
|
||||
if (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8 AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Intel")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)
|
||||
endif ()
|
||||
|
||||
# TBB malloc settings
|
||||
set(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)
|
||||
set(TBB_OPENMP_FLAG -fopenmp)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2024 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -21,15 +21,17 @@ if (MSVC)
|
||||
elseif (APPLE)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/AppleClang.cmake)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fstack-protector -Wformat -Wformat-security
|
||||
$<$<NOT:$<CONFIG:Debug>>:-fno-omit-frame-pointer -qno-opt-report-embed -D_FORTIFY_SOURCE=2>)
|
||||
$<$<NOT:$<CONFIG:Debug>>:-fno-omit-frame-pointer -qno-opt-report-embed>)
|
||||
if (NOT CMAKE_CXX_FLAGS MATCHES "_FORTIFY_SOURCE")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)
|
||||
endif ()
|
||||
|
||||
set(TBB_OPENMP_FLAG -qopenmp)
|
||||
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-ipo>)
|
||||
else()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/GNU.cmake)
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -static-intel -Wl,-z,relro,-z,now,)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fstack-protector -Wformat -Wformat-security
|
||||
$<$<NOT:$<CONFIG:Debug>>:-qno-opt-report-embed -D_FORTIFY_SOURCE=2>
|
||||
$<$<EQUAL:${TBB_ARCH},32>:-falign-stack=maintain-16-byte>)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<EQUAL:${TBB_ARCH},32>:-falign-stack=maintain-16-byte>)
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -static-intel)
|
||||
set(TBB_OPENMP_FLAG -qopenmp)
|
||||
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-ipo>)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2024 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -14,10 +15,19 @@
|
||||
|
||||
if (WIN32)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/MSVC.cmake)
|
||||
set(TBB_OPENMP_FLAG /Qopenmp)
|
||||
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/Qipo>)
|
||||
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:/INCREMENTAL:NO>)
|
||||
else()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/Clang.cmake)
|
||||
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-ipo>)
|
||||
# "--exclude-libs,ALL" is used to avoid accidental exporting of symbols
|
||||
# from statically linked libraries
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -static-intel -Wl,--exclude-libs,ALL)
|
||||
set(TBB_OPENMP_FLAG -qopenmp)
|
||||
# Under Linux, ipo detection for 2024+ versions of Intel compilers is supported starting cmake 3.30.1.
|
||||
if (CMAKE_VERSION VERSION_LESS 3.30.1 AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 2023)
|
||||
set(TBB_IPO_DETECTION_BROKEN TRUE)
|
||||
endif()
|
||||
endif()
|
||||
set(TBB_IPO_LINK_FLAGS ${TBB_IPO_LINK_FLAGS} ${TBB_IPO_COMPILE_FLAGS})
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -32,8 +33,14 @@ if (MSVC_VERSION LESS_EQUAL 1900)
|
||||
# https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4503
|
||||
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} /wd4503)
|
||||
endif()
|
||||
set(TBB_LIB_COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS /GS)
|
||||
set(TBB_COMMON_COMPILE_FLAGS /volatile:iso /FS /EHsc)
|
||||
set(TBB_LIB_COMPILE_FLAGS -D_CRT_SECURE_NO_WARNINGS /GS /Gy /sdl $<$<VERSION_LESS:${MSVC_VERSION},1930>:/ZH:SHA_256>)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /volatile:iso /FS /EHsc)
|
||||
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} LINKER:/DEPENDENTLOADFLAG:0x2000 LINKER:/DYNAMICBASE LINKER:/NXCOMPAT)
|
||||
|
||||
if (TBB_ARCH EQUAL 32)
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} LINKER:/SAFESEH )
|
||||
endif()
|
||||
|
||||
# Ignore /WX set through add_compile_options() or added to CMAKE_CXX_FLAGS if TBB_STRICT is disabled.
|
||||
if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
|
||||
@@ -71,6 +78,17 @@ if (TBB_WINDOWS_DRIVER)
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /D _UNICODE /DUNICODE /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB__)
|
||||
endif()
|
||||
|
||||
if (TBB_FILE_TRIM AND NOT CMAKE_CXX_COMPILER_ID MATCHES "(Intel|IntelLLVM|Clang)")
|
||||
add_compile_options(
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:/d1trimfile:${NATIVE_TBB_PROJECT_ROOT_DIR}\\>"
|
||||
"$<$<COMPILE_LANGUAGE:CXX>:/d1trimfile:${CMAKE_SOURCE_DIR}/>")
|
||||
endif()
|
||||
|
||||
if (TBB_CONTROL_FLOW_GUARD)
|
||||
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} /guard:cf)
|
||||
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} LINKER:/guard:cf)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|IntelLLVM)")
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)")
|
||||
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm -mwaitpkg)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ function(tbb_generate_config)
|
||||
set(options HANDLE_SUBDIRS)
|
||||
set(oneValueArgs INSTALL_DIR
|
||||
SYSTEM_NAME
|
||||
LIB_REL_PATH INC_REL_PATH DLL_REL_PATH
|
||||
LIB_REL_PATH INC_REL_PATH
|
||||
VERSION
|
||||
TBB_BINARY_VERSION
|
||||
TBBMALLOC_BINARY_VERSION
|
||||
@@ -35,7 +35,6 @@ function(tbb_generate_config)
|
||||
file(MAKE_DIRECTORY ${config_install_dir})
|
||||
|
||||
file(TO_CMAKE_PATH "${tbb_gen_cfg_LIB_REL_PATH}" TBB_LIB_REL_PATH)
|
||||
file(TO_CMAKE_PATH "${tbb_gen_cfg_DLL_REL_PATH}" TBB_DLL_REL_PATH)
|
||||
file(TO_CMAKE_PATH "${tbb_gen_cfg_INC_REL_PATH}" TBB_INC_REL_PATH)
|
||||
|
||||
set(TBB_VERSION ${tbb_gen_cfg_VERSION})
|
||||
@@ -54,45 +53,61 @@ set(_tbbbind_bin_version ${tbb_gen_cfg_TBBBIND_BINARY_VERSION})
|
||||
if (tbb_gen_cfg_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(TBB_LIB_PREFIX "lib")
|
||||
set(TBB_LIB_EXT "so.\${_\${_tbb_component}_bin_version}")
|
||||
set(TBB_IMPLIB_RELEASE "")
|
||||
set(TBB_IMPLIB_DEBUG "")
|
||||
if (tbb_gen_cfg_HANDLE_SUBDIRS)
|
||||
set(TBB_HANDLE_SUBDIRS "
|
||||
if (CMAKE_SIZEOF_VOID_P STREQUAL \"8\")
|
||||
set(_tbb_subdir intel64/gcc4.8)
|
||||
else ()
|
||||
set(_tbb_subdir ia32/gcc4.8)
|
||||
endif()
|
||||
|
||||
set (TBB_HANDLE_IMPLIB "
|
||||
set (_tbb_release_dll \${_tbb_release_lib})
|
||||
set (_tbb_debug_dll \${_tbb_debug_lib})
|
||||
")
|
||||
if (tbb_gen_cfg_HANDLE_SUBDIRS)
|
||||
set(TBB_HANDLE_SUBDIRS "set(_tbb_subdir gcc4.8)")
|
||||
|
||||
set(_libdir_for_pc_file "\${prefix}/lib/intel64/gcc4.8")
|
||||
set(_tbb_pc_extra_libdir "-L\${prefix}/lib")
|
||||
configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb.pc @ONLY)
|
||||
|
||||
set(_libdir_for_pc_file "\${prefix}/lib/ia32/gcc4.8")
|
||||
set(_tbb_pc_extra_libdir "-L\${prefix}/lib32")
|
||||
configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb32.pc @ONLY)
|
||||
endif()
|
||||
elseif (tbb_gen_cfg_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set(TBB_LIB_PREFIX "lib")
|
||||
set(TBB_LIB_EXT "\${_\${_tbb_component}_bin_version}.dylib")
|
||||
set(TBB_IMPLIB_RELEASE "")
|
||||
set(TBB_IMPLIB_DEBUG "")
|
||||
|
||||
set (TBB_HANDLE_IMPLIB "
|
||||
set (_tbb_release_dll \${_tbb_release_lib})
|
||||
set (_tbb_debug_dll \${_tbb_debug_lib})
|
||||
")
|
||||
set(_libdir_for_pc_file "\${prefix}/lib")
|
||||
configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb.pc @ONLY)
|
||||
elseif (tbb_gen_cfg_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(TBB_LIB_PREFIX "")
|
||||
set(TBB_LIB_EXT "dll")
|
||||
set(TBB_LIB_EXT "lib")
|
||||
set(TBB_COMPILE_DEFINITIONS "
|
||||
INTERFACE_COMPILE_DEFINITIONS \"__TBB_NO_IMPLICIT_LINKAGE=1\"")
|
||||
|
||||
# .lib - installed to TBB_LIB_REL_PATH (e.g. <prefix>/lib) and are passed as IMPORTED_IMPLIB_<CONFIG> property to target
|
||||
# .dll - installed to <prefix>/bin or <prefix>/redist and are passed as IMPORTED_LOCATION_<CONFIG> property to target
|
||||
set (TBB_HANDLE_IMPLIB "
|
||||
find_file(_tbb_release_dll
|
||||
NAMES \${_tbb_component}\${_bin_version}.dll
|
||||
PATHS \${_tbb_root}
|
||||
PATH_SUFFIXES \"redist/\${_tbb_intel_arch}/\${_tbb_subdir}\" \"bin\${_tbb_arch_suffix}/\${_tbb_subdir}\" \"bin\${_tbb_arch_suffix}/\" \"bin\"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
# .lib files installed to TBB_LIB_REL_PATH (e.g. <prefix>/lib);
|
||||
# .dll files installed to TBB_DLL_REL_PATH (e.g. <prefix>/bin);
|
||||
# Expand TBB_LIB_REL_PATH here in IMPORTED_IMPLIB property and
|
||||
# redefine it with TBB_DLL_REL_PATH value to properly fill IMPORTED_LOCATION property in TBBConfig.cmake.in template.
|
||||
set(TBB_IMPLIB_RELEASE "
|
||||
IMPORTED_IMPLIB_RELEASE \"\${_tbb_root}/${TBB_LIB_REL_PATH}/\${_tbb_subdir}/\${_tbb_component}\${_bin_version}.lib\"")
|
||||
set(TBB_IMPLIB_DEBUG "
|
||||
IMPORTED_IMPLIB_DEBUG \"\${_tbb_root}/${TBB_LIB_REL_PATH}/\${_tbb_subdir}/\${_tbb_component}\${_bin_version}_debug.lib\"")
|
||||
set(TBB_LIB_REL_PATH ${TBB_DLL_REL_PATH})
|
||||
if (EXISTS \"\${_tbb_debug_lib}\")
|
||||
find_file(_tbb_debug_dll
|
||||
NAMES \${_tbb_component}\${_bin_version}_debug.dll
|
||||
PATHS \${_tbb_root}
|
||||
PATH_SUFFIXES \"redist/\${_tbb_intel_arch}/\${_tbb_subdir}\" \"bin\${_tbb_arch_suffix}/\${_tbb_subdir}\" \"bin\${_tbb_arch_suffix}/\" \"bin\"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
")
|
||||
set(TBB_IMPLIB_RELEASE "
|
||||
IMPORTED_IMPLIB_RELEASE \"\${_tbb_release_lib}\"")
|
||||
set(TBB_IMPLIB_DEBUG "
|
||||
IMPORTED_IMPLIB_DEBUG \"\${_tbb_debug_lib}\"")
|
||||
|
||||
if (tbb_gen_cfg_HANDLE_SUBDIRS)
|
||||
set(TBB_HANDLE_SUBDIRS "
|
||||
@@ -100,19 +115,15 @@ set(_tbb_subdir vc14)
|
||||
if (WINDOWS_STORE)
|
||||
set(_tbb_subdir \${_tbb_subdir}_uwp)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P STREQUAL \"8\")
|
||||
set(_tbb_subdir intel64/\${_tbb_subdir})
|
||||
else ()
|
||||
set(_tbb_subdir ia32/\${_tbb_subdir})
|
||||
endif()
|
||||
")
|
||||
set(_tbb_pc_lib_name ${_tbb_pc_lib_name}${TBB_BINARY_VERSION})
|
||||
|
||||
set(_libdir_for_pc_file "\${prefix}/lib/intel64/vc14")
|
||||
set(_tbb_pc_extra_libdir "-L\${prefix}/lib")
|
||||
configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb.pc @ONLY)
|
||||
|
||||
set(_libdir_for_pc_file "\${prefix}/lib/ia32/vc14")
|
||||
set(_tbb_pc_extra_libdir "-L\${prefix}/lib32")
|
||||
configure_file(${_tbb_gen_cfg_path}/../integration/pkg-config/tbb.pc.in ${config_install_dir}/tbb32.pc @ONLY)
|
||||
endif()
|
||||
|
||||
|
||||
+17
-11
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -12,23 +12,32 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
list(APPEND HWLOC_REQUIRED_VERSIONS 1_11 2 2_5)
|
||||
list(APPEND HWLOC_REQUIRED_VERSIONS static 2 2_5)
|
||||
|
||||
foreach(hwloc_version ${HWLOC_REQUIRED_VERSIONS})
|
||||
if (NOT WIN32)
|
||||
set(HWLOC_TARGET_NAME HWLOC::hwloc_${hwloc_version})
|
||||
|
||||
string(TOUPPER ${hwloc_version} hwloc_version)
|
||||
|
||||
if (NOT WIN32 OR hwloc_version MATCHES "STATIC")
|
||||
set(CMAKE_HWLOC_${hwloc_version}_DLL_PATH STUB)
|
||||
endif()
|
||||
set(HWLOC_TARGET_NAME HWLOC::hwloc_${hwloc_version})
|
||||
|
||||
if (NOT TARGET ${HWLOC_TARGET_NAME} AND
|
||||
CMAKE_HWLOC_${hwloc_version}_LIBRARY_PATH AND
|
||||
CMAKE_HWLOC_${hwloc_version}_DLL_PATH AND
|
||||
CMAKE_HWLOC_${hwloc_version}_INCLUDE_PATH
|
||||
)
|
||||
add_library(${HWLOC_TARGET_NAME} SHARED IMPORTED)
|
||||
if (HWLOC_TARGET_NAME MATCHES "static")
|
||||
set(_hwloc_library_type "STATIC")
|
||||
else()
|
||||
set(_hwloc_library_type "SHARED")
|
||||
endif()
|
||||
add_library(${HWLOC_TARGET_NAME} ${_hwloc_library_type} IMPORTED)
|
||||
|
||||
set_target_properties(${HWLOC_TARGET_NAME} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${CMAKE_HWLOC_${hwloc_version}_INCLUDE_PATH}")
|
||||
if (WIN32)
|
||||
if (WIN32 AND NOT hwloc_version MATCHES "STATIC")
|
||||
set_target_properties(${HWLOC_TARGET_NAME} PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_HWLOC_${hwloc_version}_DLL_PATH}"
|
||||
IMPORTED_IMPLIB "${CMAKE_HWLOC_${hwloc_version}_LIBRARY_PATH}")
|
||||
@@ -44,19 +53,16 @@ foreach(hwloc_version ${HWLOC_REQUIRED_VERSIONS})
|
||||
endforeach()
|
||||
|
||||
unset(HWLOC_TARGET_NAME)
|
||||
unset(_hwloc_library_type)
|
||||
|
||||
if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND
|
||||
# No hwloc auto detection for cross compilation
|
||||
NOT CMAKE_CROSSCOMPILING AND
|
||||
NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH
|
||||
)
|
||||
find_package(PkgConfig QUIET)
|
||||
if (PKG_CONFIG_FOUND AND NOT CMAKE_VERSION VERSION_LESS 3.6)
|
||||
pkg_search_module(HWLOC hwloc IMPORTED_TARGET)
|
||||
if (TARGET PkgConfig::HWLOC)
|
||||
if (HWLOC_VERSION VERSION_LESS 2)
|
||||
set(TBBBIND_LIBRARY_NAME tbbbind)
|
||||
elseif(HWLOC_VERSION VERSION_LESS 2.5)
|
||||
if(HWLOC_VERSION VERSION_LESS 2.5)
|
||||
set(TBBBIND_LIBRARY_NAME tbbbind_2_0)
|
||||
else()
|
||||
set(TBBBIND_LIBRARY_NAME tbbbind_2_5)
|
||||
|
||||
+11
-3
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -31,10 +31,18 @@ endif()
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/memcheck)
|
||||
|
||||
function(_tbb_run_memcheck test_target)
|
||||
function(_tbb_run_memcheck test_target subdir)
|
||||
set(target_name memcheck-${test_target})
|
||||
if(${subdir} STREQUAL "tbbmalloc")
|
||||
# Valgring intercepts all allocation symbols with its own by default,
|
||||
# so it disables using tbbmalloc. In case of tbbmalloc tests
|
||||
# intercept allocation symbols only in the default system libraries,
|
||||
# but not in any other shared library or the executable
|
||||
# defining public malloc or operator new related functions.
|
||||
set(option "--soname-synonyms=somalloc=nouserintercepts")
|
||||
endif()
|
||||
add_custom_target(${target_name}
|
||||
COMMAND ${VALGRIND_EXE} --leak-check=full --show-leak-kinds=all --log-file=${CMAKE_BINARY_DIR}/memcheck/${target_name}.log -v $<TARGET_FILE:${test_target}>)
|
||||
COMMAND ${VALGRIND_EXE} ${option} --leak-check=full --show-leak-kinds=all --log-file=${CMAKE_BINARY_DIR}/memcheck/${target_name}.log -v $<TARGET_FILE:${test_target}>)
|
||||
add_dependencies(memcheck-all ${target_name})
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -18,4 +18,7 @@ set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
|
||||
set(CPACK_PACKAGE_VERSION "${TBB_VERSION}")
|
||||
string(TOLOWER ${CPACK_PACKAGE_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}_${TBB_OUTPUT_DIR_BASE}_${CMAKE_BUILD_TYPE} CPACK_PACKAGE_FILE_NAME)
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
include(CPack)
|
||||
# Note: this is an internal non-documented variable set by CPack
|
||||
if (NOT CPack_CMake_INCLUDED)
|
||||
include(CPack)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2025 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -12,6 +12,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
if (POLICY CMP0148)
|
||||
# CMake 3.27: The FindPythonInterp and FindPythonLibs modules are removed
|
||||
cmake_policy(SET CMP0148 OLD)
|
||||
endif()
|
||||
|
||||
find_package(PythonInterp 3.5 REQUIRED)
|
||||
|
||||
file(GLOB_RECURSE MODULES_LIST "${PYTHON_MODULE_BUILD_PATH}/*TBB.py*" )
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# Copyright (c) 2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
if (UNIX)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wno-deprecated-declarations)
|
||||
if (APPLE)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE)
|
||||
endif()
|
||||
|
||||
check_symbol_exists("getcontext" "ucontext.h" _tbb_have_ucontext)
|
||||
if (NOT _tbb_have_ucontext)
|
||||
set(TBB_RESUMABLE_TASKS_USE_THREADS "__TBB_RESUMABLE_TASKS_USE_THREADS=1")
|
||||
endif()
|
||||
|
||||
unset(_tbb_have_ucontext)
|
||||
unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
endif()
|
||||
+12
-2
@@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2022 Intel Corporation
|
||||
# Copyright (c) 2025 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -14,7 +15,7 @@
|
||||
|
||||
set(TBB_SANITIZE ${TBB_SANITIZE} CACHE STRING "Sanitizer parameter passed to compiler/linker" FORCE)
|
||||
# Possible values of sanitizer parameter for cmake-gui for convenience, user still can use any other value.
|
||||
set_property(CACHE TBB_SANITIZE PROPERTY STRINGS "thread" "memory" "leak" "address -fno-omit-frame-pointer")
|
||||
set_property(CACHE TBB_SANITIZE PROPERTY STRINGS "thread" "memory" "leak" "address")
|
||||
|
||||
if (NOT TBB_SANITIZE)
|
||||
return()
|
||||
@@ -22,6 +23,14 @@ endif()
|
||||
|
||||
set(TBB_SANITIZE_OPTION -fsanitize=${TBB_SANITIZE})
|
||||
|
||||
if (TBB_SANITIZE MATCHES "thread")
|
||||
set(TBB_SANITIZE_OPTION "${TBB_SANITIZE_OPTION} -Wno-tsan")
|
||||
endif()
|
||||
|
||||
if (TBB_SANITIZE MATCHES "address")
|
||||
set(TBB_SANITIZE_OPTION "${TBB_SANITIZE_OPTION} -fno-omit-frame-pointer")
|
||||
endif()
|
||||
|
||||
# It is required to add sanitizer option to CMAKE_REQUIRED_LIBRARIES to make check_cxx_compiler_flag working properly:
|
||||
# sanitizer option should be passed during the compilation phase as well as during the compilation.
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${TBB_SANITIZE_OPTION} ${CMAKE_REQUIRED_LIBRARIES}")
|
||||
@@ -39,4 +48,5 @@ set(TBB_TESTS_ENVIRONMENT ${TBB_TESTS_ENVIRONMENT}
|
||||
"LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/cmake/suppressions/lsan.suppressions")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TBB_SANITIZE_OPTION}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TBB_SANITIZE_OPTION}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TBB_SANITIZE_OPTION}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,6 @@ set(TBB_ROOT_REL_PATH "../../..")
|
||||
# Paths relative to TBB root directory
|
||||
set(INC_REL_PATH "include")
|
||||
set(LIB_REL_PATH "lib")
|
||||
set(DLL_REL_PATH "redist")
|
||||
|
||||
# Parse version info
|
||||
file(READ ${CMAKE_CURRENT_LIST_DIR}/../../include/oneapi/tbb/version.h _tbb_version_info)
|
||||
@@ -45,6 +44,6 @@ set(COMMON_ARGS
|
||||
)
|
||||
|
||||
tbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/linux SYSTEM_NAME Linux HANDLE_SUBDIRS ${COMMON_ARGS})
|
||||
tbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/windows SYSTEM_NAME Windows HANDLE_SUBDIRS DLL_REL_PATH ${DLL_REL_PATH} ${COMMON_ARGS})
|
||||
tbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/darwin SYSTEM_NAME Darwin ${COMMON_ARGS})
|
||||
tbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/windows SYSTEM_NAME Windows HANDLE_SUBDIRS ${COMMON_ARGS})
|
||||
tbb_generate_config(INSTALL_DIR ${INSTALL_DIR}/darwin SYSTEM_NAME Darwin ${COMMON_ARGS})
|
||||
message(STATUS "TBBConfig files were created in ${INSTALL_DIR}")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# TSAN suppression for known issues.
|
||||
# Possible data race during ittnotify initialization. Low impact.
|
||||
race:__itt_nullify_all_pointers
|
||||
race:__itt_init_ittlib
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2017-2021 Intel Corporation
|
||||
# Copyright (c) 2017-2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -43,14 +43,38 @@ if (NOT _tbbmalloc_proxy_ix EQUAL -1)
|
||||
set(TBB_FIND_REQUIRED_tbbmalloc ${TBB_FIND_REQUIRED_tbbmalloc_proxy})
|
||||
endif()
|
||||
unset(_tbbmalloc_proxy_ix)
|
||||
|
||||
if (CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
||||
set(_tbb_intel_arch intel64)
|
||||
else ()
|
||||
set(_tbb_intel_arch ia32)
|
||||
set(_tbb_arch_suffix 32)
|
||||
endif()
|
||||
|
||||
@TBB_HANDLE_SUBDIRS@
|
||||
foreach (_tbb_component ${TBB_FIND_COMPONENTS})
|
||||
unset(_tbb_release_dll CACHE)
|
||||
unset(_tbb_debug_dll CACHE)
|
||||
unset(_tbb_release_lib CACHE)
|
||||
unset(_tbb_debug_lib CACHE)
|
||||
|
||||
set(TBB_${_tbb_component}_FOUND 0)
|
||||
@TBB_HANDLE_BIN_VERSION@
|
||||
get_filename_component(_tbb_release_lib "${_tbb_root}/@TBB_LIB_REL_PATH@/${_tbb_subdir}/@TBB_LIB_PREFIX@${_tbb_component}${_bin_version}.@TBB_LIB_EXT@" ABSOLUTE)
|
||||
|
||||
find_library(_tbb_release_lib
|
||||
NAMES @TBB_LIB_PREFIX@${_tbb_component}${_bin_version}.@TBB_LIB_EXT@
|
||||
PATHS ${_tbb_root}
|
||||
PATH_SUFFIXES "@TBB_LIB_REL_PATH@/${_tbb_intel_arch}/${_tbb_subdir}" "@TBB_LIB_REL_PATH@${_tbb_arch_suffix}/${_tbb_subdir}" "@TBB_LIB_REL_PATH@${_tbb_arch_suffix}" "@TBB_LIB_REL_PATH@"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if (NOT TBB_FIND_RELEASE_ONLY)
|
||||
get_filename_component(_tbb_debug_lib "${_tbb_root}/@TBB_LIB_REL_PATH@/${_tbb_subdir}/@TBB_LIB_PREFIX@${_tbb_component}${_bin_version}_debug.@TBB_LIB_EXT@" ABSOLUTE)
|
||||
find_library(_tbb_debug_lib
|
||||
NAMES @TBB_LIB_PREFIX@${_tbb_component}${_bin_version}_debug.@TBB_LIB_EXT@
|
||||
PATHS ${_tbb_root}
|
||||
PATH_SUFFIXES "@TBB_LIB_REL_PATH@/${_tbb_intel_arch}/${_tbb_subdir}" "@TBB_LIB_REL_PATH@${_tbb_arch_suffix}/${_tbb_subdir}" "@TBB_LIB_REL_PATH@${_tbb_arch_suffix}" "@TBB_LIB_REL_PATH@"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
endif()
|
||||
|
||||
if (EXISTS "${_tbb_release_lib}" OR EXISTS "${_tbb_debug_lib}")
|
||||
@@ -63,15 +87,17 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
|
||||
unset(_tbb_current_realpath)
|
||||
unset(_tbb_include_dir)
|
||||
|
||||
if (EXISTS "${_tbb_release_lib}")
|
||||
@TBB_HANDLE_IMPLIB@
|
||||
|
||||
if (EXISTS "${_tbb_release_dll}")
|
||||
set_target_properties(TBB::${_tbb_component} PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${_tbb_release_lib}"@TBB_IMPLIB_RELEASE@)
|
||||
IMPORTED_LOCATION_RELEASE "${_tbb_release_dll}"@TBB_IMPLIB_RELEASE@)
|
||||
set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
endif()
|
||||
|
||||
if (EXISTS "${_tbb_debug_lib}")
|
||||
if (EXISTS "${_tbb_debug_dll}")
|
||||
set_target_properties(TBB::${_tbb_component} PROPERTIES
|
||||
IMPORTED_LOCATION_DEBUG "${_tbb_debug_lib}"@TBB_IMPLIB_DEBUG@)
|
||||
IMPORTED_LOCATION_DEBUG "${_tbb_debug_dll}"@TBB_IMPLIB_DEBUG@)
|
||||
set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
||||
endif()
|
||||
|
||||
@@ -93,6 +119,10 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS})
|
||||
endif()
|
||||
endforeach()
|
||||
list(REMOVE_DUPLICATES TBB_IMPORTED_TARGETS)
|
||||
unset(_tbb_release_dll)
|
||||
unset(_tbb_debug_dll)
|
||||
unset(_tbb_release_lib)
|
||||
unset(_tbb_debug_lib)
|
||||
unset(_tbb_root)
|
||||
unset(_tbb_intel_arch)
|
||||
unset(_tbb_arch_suffix)
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Copyright (c) 2023 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Prevent double invocation.
|
||||
if (RISCV_TOOLCHAIN_INCLUDED)
|
||||
return()
|
||||
endif()
|
||||
set(RISCV_TOOLCHAIN_INCLUDED TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR riscv)
|
||||
|
||||
# User can use -DCMAKE_FIND_ROOT_PATH to specific toolchain path
|
||||
set(CMAKE_C_COMPILER ${CMAKE_FIND_ROOT_PATH}/bin/riscv64-unknown-linux-gnu-clang)
|
||||
set(CMAKE_CXX_COMPILER ${CMAKE_FIND_ROOT_PATH}/bin/riscv64-unknown-linux-gnu-clang++)
|
||||
set(CMAKE_LINKER ${CMAKE_FIND_ROOT_PATH}/bin/riscv64-unknown-linux-gnu-ld)
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
# Most linux on riscv64 support rv64imafd_zba_zbb extensions
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=rv64imafd_zba_zbb -mabi=lp64d " CACHE INTERNAL "")
|
||||
+33
-18
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2022 Intel Corporation
|
||||
# Copyright (c) 2020-2024 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -23,31 +23,46 @@ macro(tbb_remove_compile_flag flag)
|
||||
endmacro()
|
||||
|
||||
macro(tbb_install_target target)
|
||||
install(TARGETS ${target}
|
||||
EXPORT TBBTargets
|
||||
LIBRARY
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
NAMELINK_SKIP
|
||||
COMPONENT runtime
|
||||
RUNTIME
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT runtime
|
||||
ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT devel)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (TBB_INSTALL)
|
||||
install(TARGETS ${target}
|
||||
EXPORT TBBTargets
|
||||
LIBRARY
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
NAMELINK_ONLY
|
||||
COMPONENT devel)
|
||||
NAMELINK_SKIP
|
||||
COMPONENT runtime
|
||||
RUNTIME
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT runtime
|
||||
ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT devel
|
||||
FRAMEWORK
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT runtime
|
||||
OPTIONAL)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
install(TARGETS ${target}
|
||||
LIBRARY
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
NAMELINK_ONLY
|
||||
COMPONENT devel)
|
||||
endif()
|
||||
if (MSVC AND BUILD_SHARED_LIBS)
|
||||
install(FILES $<TARGET_PDB_FILE:${target}>
|
||||
DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
COMPONENT devel
|
||||
OPTIONAL)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(tbb_handle_ipo target)
|
||||
if (TBB_IPO_PROPERTY)
|
||||
set_target_properties(${target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
set_target_properties(${target} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION TRUE
|
||||
INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE
|
||||
)
|
||||
elseif (TBB_IPO_FLAGS)
|
||||
target_compile_options(${target} PRIVATE ${TBB_IPO_COMPILE_FLAGS})
|
||||
if (COMMAND target_link_options)
|
||||
|
||||
+10
-2
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020-2021 Intel Corporation
|
||||
# Copyright (c) 2020-2024 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -26,12 +26,20 @@ get_filename_component(TBB_VARS_TEMPLATE_NAME ${PROJECT_SOURCE_DIR}/integration/
|
||||
string(REPLACE ".in" "" TBB_VARS_NAME ${TBB_VARS_TEMPLATE_NAME})
|
||||
|
||||
macro(tbb_gen_vars target)
|
||||
if (NOT TBB_BUILD_APPLE_FRAMEWORKS)
|
||||
set(BIN_PATH $<TARGET_FILE_DIR:${target}>)
|
||||
else()
|
||||
# For Apple* frameworks, the binaries are placed in a framework bundle.
|
||||
# When using an Apple* framework, you refer to the bundle, not the binary inside, so we take the bundle's path and go up one level.
|
||||
# This path will then be used to generate the vars file, and the contents of the vars file will use the bundle's parent directory.
|
||||
set(BIN_PATH $<TARGET_BUNDLE_DIR:${target}>/..)
|
||||
endif()
|
||||
if (${CMAKE_PROJECT_NAME} STREQUAL ${PROJECT_NAME})
|
||||
add_custom_command(TARGET ${target} POST_BUILD COMMAND
|
||||
${CMAKE_COMMAND}
|
||||
-DBINARY_DIR=${CMAKE_BINARY_DIR}
|
||||
-DSOURCE_DIR=${PROJECT_SOURCE_DIR}
|
||||
-DBIN_PATH=$<TARGET_FILE_DIR:${target}>
|
||||
-DBIN_PATH=${BIN_PATH}
|
||||
-DVARS_TEMPLATE=${TBB_VARS_TEMPLATE}
|
||||
-DVARS_NAME=${TBB_VARS_NAME}
|
||||
-DTBB_INSTALL_VARS=${TBB_INSTALL_VARS}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
.. _Before_You_Begin:
|
||||
|
||||
Before You Begin
|
||||
****************
|
||||
|
||||
After installing |short_name|, you need to set the environment variables:
|
||||
|
||||
#. Go to the oneTBB installation directory (``<install_dir>``). By default, ``<install_dir>`` is the following:
|
||||
|
||||
* On Linux* OS:
|
||||
|
||||
* For superusers (root): ``/opt/intel/oneapi``
|
||||
* For ordinary users (non-root): ``$HOME/intel/oneapi``
|
||||
|
||||
* On Windows* OS:
|
||||
|
||||
* ``<Program Files>\Intel\oneAPI``
|
||||
|
||||
#. Set the environment variables, using the script in <install_dir>, by running
|
||||
|
||||
* On Linux* OS:
|
||||
|
||||
``vars.{sh|csh} in <install_dir>/tbb/latest/env``
|
||||
|
||||
* On Windows* OS:
|
||||
|
||||
``vars.bat in <install_dir>/tbb/latest/env``
|
||||
|
||||
|
||||
Example
|
||||
*******
|
||||
|
||||
Below you can find a typical example for a |short_name| algorithm.
|
||||
The sample calculates a sum of all integer numbers from 1 to 100.
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
int sum = oneapi::tbb::parallel_reduce(oneapi::tbb::blocked_range<int>(1,101), 0,
|
||||
[](oneapi::tbb::blocked_range<int> const& r, int init) -> int {
|
||||
for (int v = r.begin(); v != r.end(); v++ ) {
|
||||
init += v;
|
||||
}
|
||||
return init;
|
||||
},
|
||||
[](int lhs, int rhs) -> int {
|
||||
return lhs + rhs;
|
||||
}
|
||||
);
|
||||
@@ -1,45 +0,0 @@
|
||||
.. _examples:
|
||||
|
||||
oneTBB Samples
|
||||
==============
|
||||
|
||||
Refer to the following examples to see how |short_name| works.
|
||||
|
||||
* **Containers**
|
||||
|
||||
* `concurrent_hash_map <https://github.com/oneapi-src/oneTBB/tree/master/examples/concurrent_hash_map>`_
|
||||
* `concurrent_priority_queue <https://github.com/oneapi-src/oneTBB/tree/master/examples/concurrent_priority_queue>`_
|
||||
|
||||
* `Flow Graph <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph>`_
|
||||
* `A solution to the binpacking problem using a queue_node, a buffer_node, and function_node. <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph/binpack>`_
|
||||
* `Cholesky Factorization algorithm <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph/cholesky>`_
|
||||
* `An implementation of dining philosophers in graph using the reserving join_node <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph/dining_philosophers>`_
|
||||
* `A parallel implementation of bzip2 block-sorting file compressor <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph/fgbzip2>`_
|
||||
* `An example of a collection of digital logic gates that can be easily composed into larger circuits <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph/logic_sim>`_
|
||||
* `An example of a Kohonen Self-Organizing Map using cancellation <https://github.com/oneapi-src/oneTBB/tree/master/examples/graph/som>`_
|
||||
* `Split computational kernel for execution between CPU and GPU <https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB/tbb-async-sycl>`_
|
||||
|
||||
* **Algorithms**
|
||||
|
||||
* `parallel_for <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_for>`_
|
||||
* `Game of life overlay <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_for/game_of_life>`_
|
||||
* `Polygon overlay <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_for/polygon_overlay>`_
|
||||
* `Parallel seismic wave simulation <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_for/seismic>`_
|
||||
* `Parallel 2-D raytracer/renderer <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_for/tachyon>`_
|
||||
* `Find largest matching substrings <https://github.com/oneapi-src/oneTBB/tree/master/examples/getting_started>`_
|
||||
* `Resumable task: Split computational kernel for execution between CPU and GPU <https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB/tbb-resumable-tasks-sycl>`_
|
||||
* `parallel_for_each <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_for_each>`_
|
||||
* `parallel_pipeline <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_pipeline>`_
|
||||
* `parallel_reduce <https://github.com/oneapi-src/oneTBB/tree/master/examples/parallel_reduce>`_
|
||||
|
||||
* **Task Scheduler**
|
||||
|
||||
* `task_arena <https://github.com/oneapi-src/oneTBB/tree/master/examples/task_arena>`_
|
||||
* `task_group <https://github.com/oneapi-src/oneTBB/tree/master/examples/task_group>`_
|
||||
* `Execute similar computational kernels, with one task executing the SYCL* code and the other task executing the oneTBB code <https://github.com/oneapi-src/oneAPI-samples/tree/master/Libraries/oneTBB/tbb-task-sycl>`_
|
||||
|
||||
* **Other**
|
||||
|
||||
* `Compute Fibonacci numbers in different ways <https://github.com/oneapi-src/oneTBB/tree/master/examples/test_all>`_
|
||||
|
||||
|
||||
+13
-8
@@ -1,15 +1,20 @@
|
||||
.. _Get_Started_Guide:
|
||||
|
||||
Get Started with |short_name|
|
||||
==============================
|
||||
Get Started with |full_name|
|
||||
=============================
|
||||
|
||||
.. include:: intro_gsg.rst
|
||||
.. include:: /GSG/intro_gsg.rst
|
||||
|
||||
.. include:: system_requirements.rst
|
||||
To start using oneTBB, follow the next steps:
|
||||
*********************************************
|
||||
|
||||
.. include:: before_beginning_and_example.rst
|
||||
#. See the :ref:`System Requirements<system_requirements>`.
|
||||
#. :ref:`Install oneTBB<installation>`.
|
||||
#. Run your program using oneTBB following the :ref:`Next Steps <next_steps>`.
|
||||
#. Learn how to :ref:`Integrate oneTBB into your project <integrate>` using CMake* and pkg-config tool.
|
||||
#. See :ref:`oneTBB Samples <samples>`.
|
||||
|
||||
Find more
|
||||
*********
|
||||
|
||||
See our `documentation <https://oneapi-src.github.io/oneTBB/>`_ to learn more about |short_name|.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
Installation
|
||||
============
|
||||
|
||||
See the `installation instructions <https://github.com/oneapi-src/oneTBB/blob/master/INSTALL.md>`_
|
||||
See the `installation instructions <https://github.com/uxlfoundation/oneTBB/blob/master/INSTALL.md>`_
|
||||
that will help you to install |short_name| successfully.
|
||||
@@ -0,0 +1,80 @@
|
||||
.. _integrate:
|
||||
|
||||
Integrate oneTBB
|
||||
================
|
||||
|
||||
If you want to improve the performance and scalability of your application, you can integrate oneTBB into your project.
|
||||
For example, you may want to integrate oneTBB if your application needs to process large amounts of data in parallel.
|
||||
|
||||
To integrate oneTBB, you need to:
|
||||
|
||||
* Link oneTBB with the project's source code.
|
||||
* Provide the necessary compiler and linker flags.
|
||||
|
||||
However, you can use CMake* and the pkg-config tool to simplify the process of integrating oneTBB into your project and handling its dependencies.
|
||||
See the instructions below to learn how to use the tools.
|
||||
|
||||
Integrate oneTBB with CMake*
|
||||
****************************
|
||||
|
||||
CMake* is a cross-platform build tool that helps you manage dependencies and build systems.
|
||||
Integrating oneTBB into your project using CMake*:
|
||||
|
||||
* Simplifies the process of building and linking against the library.
|
||||
* Ensures that your project can be built and run on multiple platforms.
|
||||
* Lets you manage oneTBB dependencies.
|
||||
|
||||
To add oneTBB to another project using CMake*, add the following commands to your ``CMakeLists.txt`` file:
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
find_package(TBB REQUIRED)
|
||||
target_link_libraries(my_executable TBB::tbb)
|
||||
|
||||
Additionally, you can also enable experimental C++20 modules support for TBB using the following commands
|
||||
(see :ref:`cxx20_modules_support` for details):
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
get_target_property(_tbb_include_dir TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
|
||||
target_sources(my_executable PRIVATE
|
||||
FILE_SET cxx_modules TYPE CXX_MODULES
|
||||
BASE_DIRS ${_tbb_include_dir}
|
||||
FILES ${_tbb_include_dir}/oneapi/tbb.cppm
|
||||
)
|
||||
|
||||
After that, configure your project with CMake* as usual.
|
||||
|
||||
|
||||
Compile a Program Using pkg-config
|
||||
***********************************
|
||||
|
||||
The pkg-config tool is used to simplify the compilation line by retrieving information about packages
|
||||
from special metadata files. It helps avoid large hard-coded paths and makes compilation more portable.
|
||||
|
||||
To compile a test program ``test.cpp`` with oneTBB on Linux* OS,
|
||||
provide the full path to search for included files and libraries, or provide a line as the following:
|
||||
|
||||
.. code-block::
|
||||
|
||||
g++ -o test test.cpp $(pkg-config --libs --cflags tbb)
|
||||
|
||||
Where:
|
||||
|
||||
``--cflags`` provides oneTBB library include path:
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ pkg-config --cflags tbb
|
||||
-I<path-to>/tbb/latest/lib/pkgconfig/../../include
|
||||
|
||||
``--libs`` provides the Intel(R) oneTBB library name and the search path to find it:
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ pkg-config –libs tbb
|
||||
-L<path to>tbb/latest/lib/pkgconfig/../../lib/intel64/gcc4.8 -ltbb
|
||||
|
||||
.. note::
|
||||
|
||||
For Windows* OS, additionally, use the ``--msvc-syntax`` option flag that converts the compiling and linking flags in an appropriate mode.
|
||||
+15
-9
@@ -1,12 +1,14 @@
|
||||
.. _Intro_gsg:
|
||||
|short_name| Get Started Guide provides the information you need to begin working with oneTBB.
|
||||
It is helpful for new users of parallel programming and experienced developers that want to improve code performance.
|
||||
|
||||
It is recommended for you to have a basic knowledge of C++ programming and some experience with parallel programming concepts.
|
||||
|
||||
|full_name| is a runtime-based parallel programming model for C++ code that uses threads.
|
||||
It consists of a template-based runtime library to help you harness the latent performance of multi-core processors.
|
||||
|full_name| is a runtime-based parallel programming model for C++ code that uses tasks.
|
||||
The template-based runtime library can help you harness the latent performance of multi-core processors.
|
||||
|
||||
oneTBB enables you to simplify parallel programming by breaking computation into parallel running tasks. Within a single process,
|
||||
parallelism is carried out through threads, an operating system mechanism that allows the same or different sets of instructions
|
||||
to be executed simultaneously.
|
||||
parallelism is carried out by mapping tasks to threads. Threads are an operating system mechanism that allows the same or different sets of instructions
|
||||
to be executed simultaneously. Using threads can make your program work faster and more efficiently.
|
||||
|
||||
Here you can see one of the possible executions of tasks by threads.
|
||||
|
||||
@@ -16,8 +18,12 @@ Here you can see one of the possible executions of tasks by threads.
|
||||
|
||||
Use oneTBB to write scalable applications that:
|
||||
|
||||
* Specify logical parallel structure instead of threads
|
||||
* Emphasize data-parallel programming
|
||||
* Take advantage of concurrent collections and parallel algorithms
|
||||
* Specify logical parallel structure instead of threads.
|
||||
* Emphasize data-parallel programming.
|
||||
* Take advantage of concurrent collections and parallel algorithms.
|
||||
|
||||
oneTBB supports nested parallelism and load balancing. It means that you can use the library without being worried about oversubscribing a system.
|
||||
oneTBB supports nested parallelism and load balancing. It means that you can use the library without worrying about oversubscribing a system, which happens when more tasks are assigned to a system than it can handle efficiently.
|
||||
|
||||
oneTBB is used in different areas, such as scientific simulations, gaming, data analysis, etc.
|
||||
|
||||
It is available as a stand-alone product and as part of the |toolkit|.
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
.. _next_steps:
|
||||
|
||||
Next Steps
|
||||
===========
|
||||
|
||||
After installing oneTBB, complete the following steps to start working with the library.
|
||||
|
||||
Set the Environment Variables
|
||||
*****************************
|
||||
|
||||
After installing |short_name|, set the environment variables:
|
||||
|
||||
#. Go to the oneTBB installation directory.
|
||||
|
||||
#. Set the environment variables using the script in ``<install_dir>`` by running:
|
||||
|
||||
* On Linux* OS: ``vars.{sh|csh} in <install_dir>/tbb/latest/env``
|
||||
* On Windows* OS: ``vars.bat in <install_dir>/tbb/latest/env``
|
||||
|
||||
.. tip::
|
||||
|
||||
oneTBB can coordinate with Intel(R) OpenMP on CPU resources usage to avoid
|
||||
excessive oversubscription when both runtimes are used within a process. To
|
||||
enable this feature set ``TCM_ENABLE`` environment variable to ``1``. For
|
||||
more details, see :ref:`avoid_cpu_overutilization`.
|
||||
|
||||
|
||||
Build and Run a Sample
|
||||
**********************
|
||||
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Windows* OS
|
||||
|
||||
#. Create a new C++ project using your IDE. In this example, Microsoft* Visual Studio* Code is used.
|
||||
#. Create an ``example.cpp`` file in the project.
|
||||
#. Copy and paste the code below. It is a typical example of a |short_name| algorithm. The sample calculates a sum of all integer numbers from 1 to 100.
|
||||
|
||||
.. code::
|
||||
|
||||
#include <oneapi/tbb.h>
|
||||
|
||||
int main (){
|
||||
int sum = oneapi::tbb::parallel_reduce(
|
||||
oneapi::tbb::blocked_range<int>(1,101), 0,
|
||||
[](oneapi::tbb::blocked_range<int> const& r, int init) -> int {
|
||||
for (int v = r.begin(); v != r.end(); v++) {
|
||||
init += v;
|
||||
}
|
||||
return init;
|
||||
},
|
||||
[](int lhs, int rhs) -> int {
|
||||
return lhs + rhs;
|
||||
}
|
||||
);
|
||||
|
||||
printf("Sum: %d\n", sum);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#. Open the ``tasks.json`` file in the ``.vscode`` directory and paste the following lines to the args array:
|
||||
|
||||
* ``-Ipath/to/oneTBB/include`` to add oneTBB include directory.
|
||||
* ``path/to/oneTBB/`` to add oneTBB.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build & run",
|
||||
"type": "cppbuild",
|
||||
"group": {
|
||||
"args": [
|
||||
"/IC:\\Program Files (x86)\\Intel\\oneAPI\\tbb\\2022.0.0\\include",
|
||||
"C:\\Program Files (x86)\\Intel\\oneAPI\\tbb\\2022.0.0\\lib\\tbb12.lib"
|
||||
|
||||
|
||||
#. Build the project.
|
||||
#. Run the example.
|
||||
#. If oneTBB is configured correctly, the output displays ``Sum: 5050``.
|
||||
|
||||
.. tab-item:: Linux* OS
|
||||
|
||||
#. Create an ``example.cpp`` file in the project.
|
||||
#. Copy and paste the code below. It is a typical example of a |short_name| algorithm. The sample calculates a sum of all integer numbers from 1 to 100.
|
||||
|
||||
.. code::
|
||||
|
||||
#include <oneapi/tbb.h>
|
||||
|
||||
int main(){
|
||||
int sum = oneapi::tbb::parallel_reduce(
|
||||
oneapi::tbb::blocked_range<int>(1,101), 0,
|
||||
[](oneapi::tbb::blocked_range<int> const& r, int init) -> int {
|
||||
for (int v = r.begin(); v != r.end(); v++) {
|
||||
init += v;
|
||||
}
|
||||
return init;
|
||||
},
|
||||
[](int lhs, int rhs) -> int {
|
||||
return lhs + rhs;
|
||||
}
|
||||
);
|
||||
|
||||
printf("Sum: %d\n", sum);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#. Compile the code using oneTBB. For example,
|
||||
|
||||
.. code-block::
|
||||
|
||||
g++ -std=c++11 example.cpp -o example -ltbb
|
||||
|
||||
|
||||
#. Run the executable:
|
||||
|
||||
.. code-block::
|
||||
|
||||
./example
|
||||
|
||||
#. If oneTBB is configured correctly, the output displays ``Sum: 5050``.
|
||||
|
||||
|
||||
|
||||
Enable Hybrid CPU and NUMA Support
|
||||
***********************************
|
||||
|
||||
To support Hybrid CPU and NUMA platforms, oneTBB relies on the HWLOC* library.
|
||||
|
||||
The HWLOC functionality is accessed through a set of proxy libraries whose names begin with the ``tbbbind`` prefix. oneTBB automatically loads them at runtime when needed. To find and load these libraries successfully, locate them in the same directory as the oneTBB library itself (e.g., alongside ``libtbb.so`` or ``tbb.dll``).
|
||||
|
||||
Starting with oneTBB 2022.2, the default ``tbbbind`` library is statically linked with HWLOC 2.x. This version is used if a system-provided HWLOC cannot be found.
|
||||
|
||||
If you prefer to use a system-provided or custom-built version of HWLOC, make sure it is available in the search paths used by the dynamic loader. Consult your platform’s dynamic loader documentation for details about these paths (e.g., ``LD_LIBRARY_PATH`` on Linux* OS or ``PATH`` on Windows* OS).
|
||||
|
||||
To use a specific HWLOC version, place one of the following tbbbind variants in the same directory as the oneTBB library:
|
||||
|
||||
* ``tbbbind_2_5`` — depends on HWLOC version 2.5 or higher. Use this version if hybrid CPU support is required.
|
||||
* ``tbbbind_2_0`` — depends on HWLOC versions 2.1 to 2.4.
|
||||
|
||||
.. tip:: To confirm that tbbbind is loaded successfully at runtime, set the environment variable ``TBB_VERSION=1`` before launching your application.
|
||||
@@ -0,0 +1,49 @@
|
||||
.. _samples:
|
||||
|
||||
oneTBB Samples
|
||||
==============
|
||||
|
||||
To become an expert in using oneTBB, explore its samples and examples to learn how
|
||||
to properly utilize the features and functionality of oneTBB and avoid common mistakes that may impede your performance.
|
||||
|
||||
The following samples are available:
|
||||
|
||||
* **Containers**
|
||||
|
||||
* `concurrent_hash_map <https://github.com/uxlfoundation/oneTBB/tree/master/examples/concurrent_hash_map>`_
|
||||
* `concurrent_priority_queue <https://github.com/uxlfoundation/oneTBB/tree/master/examples/concurrent_priority_queue>`_
|
||||
|
||||
* `Flow Graph <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph>`_
|
||||
* `A solution to the binpacking problem using a queue_node, a buffer_node, and function_node. <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/binpack>`_
|
||||
* `Cholesky Factorization algorithm <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/cholesky>`_
|
||||
* `An implementation of dining philosophers in graph using the reserving join_node <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/dining_philosophers>`_
|
||||
* `A parallel implementation of bzip2 block-sorting file compressor <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/fgbzip2>`_
|
||||
* `An example of a collection of digital logic gates that can be easily composed into larger circuits <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/logic_sim>`_
|
||||
* `An example of a Kohonen Self-Organizing Map using cancellation <https://github.com/uxlfoundation/oneTBB/tree/master/examples/graph/som>`_
|
||||
* `Split computational kernel for execution between CPU and GPU <https://github.com/uxlfoundation/oneTBB/tree/master/examples/sycl/tbb-async-sycl>`_
|
||||
|
||||
* **Algorithms**
|
||||
|
||||
* `parallel_for <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for>`_
|
||||
* `Game of life overlay <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/game_of_life>`_
|
||||
* `Polygon overlay <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/polygon_overlay>`_
|
||||
* `Parallel seismic wave simulation <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/seismic>`_
|
||||
* `Parallel 2-D raytracer/renderer <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for/tachyon>`_
|
||||
* `Find largest matching substrings <https://github.com/uxlfoundation/oneTBB/tree/master/examples/getting_started>`_
|
||||
* `Resumable task: Split computational kernel for execution between CPU and GPU <https://github.com/uxlfoundation/oneTBB/tree/master/examples/sycl/tbb-resumable-tasks-sycl>`_
|
||||
* `parallel_for_each <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_for_each>`_
|
||||
* `parallel_pipeline <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_pipeline>`_
|
||||
* `parallel_reduce <https://github.com/uxlfoundation/oneTBB/tree/master/examples/parallel_reduce>`_
|
||||
|
||||
* **Task Scheduler**
|
||||
|
||||
* `task_arena <https://github.com/uxlfoundation/oneTBB/tree/master/examples/task_arena>`_
|
||||
* `task_group <https://github.com/uxlfoundation/oneTBB/tree/master/examples/task_group>`_
|
||||
* `Execute similar computational kernels, with one task executing the SYCL* code and the other task executing the oneTBB code <https://github.com/uxlfoundation/oneTBB/tree/master/examples/sycl/tbb-task-sycl>`_
|
||||
|
||||
* **Other**
|
||||
|
||||
* `Compute Fibonacci numbers in different ways <https://github.com/uxlfoundation/oneTBB/tree/master/examples/test_all>`_
|
||||
|
||||
|
||||
.. note:: You can also refer to the `oneAPI Samples <https://oneapi-src.github.io/oneAPI-samples/>`_ to learn more about the ecosystem.
|
||||
@@ -3,4 +3,5 @@
|
||||
System Requirements
|
||||
*******************
|
||||
|
||||
Refer to the `oneTBB System Requirements <https://github.com/oneapi-src/oneTBB/blob/master/SYSTEM_REQUIREMENTS.md>`_.
|
||||
|full_name| supports a broad list of hardware platforms, operating systems, and compilers.
|
||||
For details, see `oneTBB System Requirements <https://github.com/uxlfoundation/oneTBB/blob/master/SYSTEM_REQUIREMENTS.md>`_.
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = doc
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ Do the following to generate HTML output of the documentation:
|
||||
1. Clone oneTBB repository:
|
||||
|
||||
```
|
||||
git clone https://github.com/oneapi-src/oneTBB.git
|
||||
git clone https://github.com/uxlfoundation/oneTBB.git
|
||||
```
|
||||
|
||||
2. Go to the `doc` folder:
|
||||
|
||||
+80
-14
@@ -13,6 +13,7 @@
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
import os
|
||||
from docutils import nodes
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
@@ -23,14 +24,19 @@ TITLE_PAGE_FILE = os.path.join(LATEX_DIR, 'title_page.tex')
|
||||
|
||||
BUILD_TYPE = os.getenv("BUILD_TYPE")
|
||||
|
||||
# Set up tags for conditional content
|
||||
# Tags allow using .. only:: directives in RST files
|
||||
if BUILD_TYPE == 'oss' or BUILD_TYPE is None:
|
||||
tags.add('oss')
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
|
||||
project = u'Intel® oneAPI Threading Building Blocks (oneTBB)'
|
||||
else:
|
||||
project = u'oneTBB'
|
||||
copyright = u'2022, Intel Corporation'
|
||||
author = u'Intel'
|
||||
copyright = u'UXL Foundation Contributors'
|
||||
author = u''
|
||||
|
||||
# The short X.Y version
|
||||
version = u''
|
||||
@@ -56,7 +62,8 @@ extensions = [
|
||||
'sphinx.ext.imgmath',
|
||||
'sphinx.ext.ifconfig',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.githubpages'
|
||||
'sphinx.ext.githubpages',
|
||||
'sphinx_design'
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@@ -77,18 +84,30 @@ master_doc = 'index'
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = []
|
||||
# Base exclude patterns - specification files that should never be built
|
||||
exclude_patterns = [
|
||||
'main/specification/source/nested-*.rst',
|
||||
'main/specification/source/uncategorized.rst',
|
||||
'main/specification/source/uncategorized/**',
|
||||
'main/specification/source/low_level_task_api.rst',
|
||||
'main/specification/source/low_level_tasking/**',
|
||||
]
|
||||
|
||||
# Specification is only included in OSS builds (GitHub Pages)
|
||||
# Intel builds (oneapi/dita) automatically exclude the entire specification directory
|
||||
if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
|
||||
exclude_patterns.append('main/specification/**')
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = None
|
||||
|
||||
# Syntax highlighting for the :: directive
|
||||
highlight_language = 'cpp'
|
||||
highlight_language = 'cpp'
|
||||
|
||||
if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
|
||||
rst_prolog = """
|
||||
@@ -97,7 +116,7 @@ if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
|
||||
.. |product| replace:: oneTBB
|
||||
.. |reg| unicode:: U+000AE
|
||||
.. |copy| unicode:: U+000A9
|
||||
.. |base_tk| replace:: Intel\ |reg|\ oneAPI Base Toolkit
|
||||
.. |toolkit| replace:: Intel\ |reg|\ oneAPI Toolkit (oneAPI Kit)
|
||||
.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler
|
||||
"""
|
||||
else:
|
||||
@@ -107,7 +126,7 @@ else:
|
||||
.. |product| replace:: oneTBB
|
||||
.. |reg| unicode:: U+000AE
|
||||
.. |copy| unicode:: U+000A9
|
||||
.. |base_tk| replace:: Intel\ |reg|\ oneAPI Base Toolkit
|
||||
.. |toolkit| replace:: Intel\ |reg|\ oneAPI Toolkit (oneAPI Kit)
|
||||
.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler
|
||||
"""
|
||||
|
||||
@@ -125,21 +144,21 @@ html_theme = 'sphinx_book_theme'
|
||||
|
||||
if BUILD_TYPE == 'dita':
|
||||
html_theme_options = {
|
||||
'repository_url': 'https://github.com/oneapi-src/oneTBB',
|
||||
'repository_url': 'https://github.com/uxlfoundation/oneTBB',
|
||||
'path_to_docs': 'doc',
|
||||
'repository_branch': 'master'
|
||||
}
|
||||
else:
|
||||
html_theme_options = {
|
||||
'repository_url': 'https://github.com/oneapi-src/oneTBB',
|
||||
'path_to_docs': 'doc/main',
|
||||
'repository_url': 'https://github.com/uxlfoundation/oneTBB',
|
||||
'path_to_docs': 'doc',
|
||||
'use_issues_button': True,
|
||||
'use_edit_page_button': True,
|
||||
'repository_branch': 'master',
|
||||
'extra_footer': '<p align="right"><a href="https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html">Cookies</a></p>'
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
@@ -154,10 +173,12 @@ if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
|
||||
else:
|
||||
html_js_files = ['custom.js']
|
||||
|
||||
html_theme_options["logo"] = {"text": "oneTBB Documentation"}
|
||||
|
||||
html_logo = '_static/oneAPI-rgb-rev-100.png'
|
||||
html_favicon = '_static/favicons.png'
|
||||
|
||||
|
||||
# Custom sidebar templates, must be a dictionary that maps document names
|
||||
# to template names.
|
||||
#
|
||||
@@ -293,9 +314,54 @@ epub_exclude_files = ['search.html']
|
||||
# -- Options for intersphinx extension ---------------------------------------
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
|
||||
|
||||
# -- Options for todo extension ----------------------------------------------
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = True
|
||||
|
||||
|
||||
# -- Custom role for oneTBB specification links ------------------------------
|
||||
|
||||
def onetbb_spec_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
||||
"""
|
||||
Custom role that generates internal :doc: links for OSS builds,
|
||||
and external links for oneAPI/DITA builds.
|
||||
|
||||
Usage: :onetbb-spec:`link text <path>`
|
||||
"""
|
||||
from sphinx.util.nodes import split_explicit_title
|
||||
|
||||
# Parse the role syntax
|
||||
has_explicit_title, title, target = split_explicit_title(text)
|
||||
|
||||
if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
|
||||
# Generate external link for oneAPI/DITA builds
|
||||
url = f'https://uxlfoundation.github.io/oneTBB/main/specification/source/{target}.html'
|
||||
node = nodes.reference(rawtext, title, refuri=url, **options)
|
||||
return [node], []
|
||||
else:
|
||||
# Generate internal :doc: link for OSS builds
|
||||
doc_path = f'/main/specification/source/{target}'
|
||||
|
||||
# Create a pending_xref node that Sphinx will resolve
|
||||
from sphinx.addnodes import pending_xref
|
||||
|
||||
refnode = pending_xref(
|
||||
rawtext,
|
||||
refdomain='std',
|
||||
reftype='doc',
|
||||
reftarget=doc_path,
|
||||
refexplicit=has_explicit_title,
|
||||
refwarn=True
|
||||
)
|
||||
refnode += nodes.inline(rawtext, title)
|
||||
|
||||
return [refnode], []
|
||||
|
||||
|
||||
def setup(app):
|
||||
"""Setup function to register the custom role"""
|
||||
app.add_role('onetbb-spec', onetbb_spec_role)
|
||||
return {'version': '0.1', 'parallel_read_safe': True, 'parallel_write_safe': True}
|
||||
|
||||
+20
-2
@@ -2,6 +2,7 @@
|
||||
|
||||
.. toctree::
|
||||
:caption: About
|
||||
:hidden:
|
||||
:maxdepth: 1
|
||||
|
||||
/main/intro/help_support
|
||||
@@ -9,19 +10,27 @@
|
||||
/main/intro/intro_os
|
||||
/main/intro/Benefits
|
||||
/main/intro/testing_approach
|
||||
/main/intro/limitations.rst
|
||||
/main/intro/static_linking
|
||||
/main/intro/api_abi_changes
|
||||
|
||||
|
||||
.. toctree::
|
||||
:caption: Get Started
|
||||
:maxdepth: 2
|
||||
:hidden:
|
||||
:maxdepth: 1
|
||||
|
||||
/GSG/get_started
|
||||
/GSG/system_requirements
|
||||
/GSG/installation
|
||||
/GSG/examples
|
||||
/GSG/next_steps
|
||||
/GSG/integrate
|
||||
/GSG/samples
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:hidden:
|
||||
:caption: Developer Guide
|
||||
|
||||
/main/tbb_userguide/title
|
||||
@@ -29,6 +38,15 @@
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:hidden:
|
||||
:caption: Developer Reference
|
||||
|
||||
/main/reference/reference
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:hidden:
|
||||
:caption: Specification
|
||||
|
||||
/main/specification/source/index
|
||||
|
||||
@@ -1,16 +1 @@
|
||||
{% extends "!layout.html" %}
|
||||
{% block extrahead %}
|
||||
<script defer type="text/javascript" src="https://www.intel.com/content/dam/www/global/wap/performance-config.js" ></script>
|
||||
<script type="text/javascript">
|
||||
// Configure TMS settings
|
||||
var wapLocalCode = 'us-en'; // Dynamically set per localized site, see mapping table for values
|
||||
var wapSection = "oneapi-tbb"; // WAP team will give you a unique section for your site
|
||||
// Load TMS
|
||||
(function () {
|
||||
var url = 'https://www.intel.com/content/dam/www/global/wap/tms-loader.js'; // WAP file URL
|
||||
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = url;
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
||||
})();
|
||||
</script>
|
||||
<link href="{{ pathto("_static/style.css", True) }}" rel="stylesheet" type="text/css">
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# Copyright (c) 2025 Intel Corporation
|
||||
# Copyright (c) 2026 UXL Foundation Contributors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required(VERSION 3.5.0...3.31.3)
|
||||
project(doc_examples_testing LANGUAGES CXX)
|
||||
|
||||
set(_reference_examples_path "${CMAKE_CURRENT_SOURCE_DIR}/../reference/examples")
|
||||
set(_userguide_examples_path "${CMAKE_CURRENT_SOURCE_DIR}/../tbb_userguide/examples")
|
||||
|
||||
# Examples that require special handling and are excluded from the generic build
|
||||
set(_doc_examples_exclude_regex
|
||||
"cxx20_module_example\\.cpp$" # requires C++20 modules support
|
||||
)
|
||||
|
||||
add_custom_target(build-doc-examples
|
||||
COMMENT "Build oneTBB documentation samples")
|
||||
set(doc_examples_test_label "doc-examples")
|
||||
|
||||
macro(add_doc_example _doc_example_path)
|
||||
get_filename_component(_doc_example_name "${_doc_example_path}" NAME_WE)
|
||||
add_executable(${_doc_example_name} EXCLUDE_FROM_ALL "${_doc_example_path}")
|
||||
|
||||
add_dependencies(${_doc_example_name} TBB::tbb TBB::tbbmalloc TBB::tbbmalloc_proxy)
|
||||
target_link_libraries(${_doc_example_name} TBB::tbb TBB::tbbmalloc TBB::tbbmalloc_proxy)
|
||||
|
||||
add_dependencies(build-doc-examples ${_doc_example_name})
|
||||
add_test(NAME ${_doc_example_name} COMMAND ${_doc_example_name})
|
||||
set_tests_properties(${_doc_example_name} PROPERTIES LABELS "${doc_examples_test_label}")
|
||||
endmacro()
|
||||
|
||||
file(GLOB_RECURSE DOC_EXAMPLES_LIST "${_reference_examples_path}/*.cpp" "${_userguide_examples_path}/*.cpp")
|
||||
list(FILTER DOC_EXAMPLES_LIST EXCLUDE REGEX "${_doc_examples_exclude_regex}")
|
||||
|
||||
foreach(_doc_example_path IN LISTS DOC_EXAMPLES_LIST)
|
||||
add_doc_example(${_doc_example_path})
|
||||
endforeach()
|
||||
|
||||
if (TBB_TEST_CXX20_MODULES)
|
||||
if (CMAKE_VERSION VERSION_LESS 3.28)
|
||||
message(WARNING "CMake 3.28 or higher is required for C++20 modules, skipping cxx20_module_example")
|
||||
else()
|
||||
add_doc_example("${_userguide_examples_path}/cxx20_module_example.cpp")
|
||||
target_sources(cxx20_module_example PRIVATE
|
||||
FILE_SET CXX_MODULES
|
||||
BASE_DIRS ${CMAKE_SOURCE_DIR}/include
|
||||
FILES ${CMAKE_SOURCE_DIR}/include/oneapi/tbb.cppm
|
||||
)
|
||||
target_compile_features(cxx20_module_example PRIVATE cxx_std_20)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_package(OpenMP)
|
||||
if (OpenMP_FOUND)
|
||||
target_compile_options(tbb_mixing_other_runtimes_example PRIVATE "${OpenMP_CXX_FLAGS}")
|
||||
target_link_options(tbb_mixing_other_runtimes_example PRIVATE "${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
@@ -20,7 +20,7 @@ it with any compiler supporting ISO C++. The library differs from
|
||||
typical threading packages in the following ways:
|
||||
|
||||
|
||||
- **oneTBB enables you to specify logical paralleism instead of
|
||||
- **oneTBB enables you to specify logical parallelism instead of
|
||||
threads**. Most threading packages require you to specify threads.
|
||||
Programming directly in terms of threads can be tedious and lead to
|
||||
inefficient programs, because threads are low-level, heavy constructs
|
||||
|
||||
@@ -0,0 +1,427 @@
|
||||
.. _api_abi_changes:
|
||||
|
||||
API and ABI Change Log
|
||||
======================
|
||||
|
||||
This document tracks API and ABI changes across oneTBB releases. Each release may introduce new APIs,
|
||||
modify existing ones, or add new symbols to the binary interface. Generally, we strive to maintain backward
|
||||
compatibility, but some releases may include changes that require attention when upgrading. If a release adds
|
||||
new entry points to the binary library, this is a backwards compatible change, since applications compiled
|
||||
with an older set of headers will not be affected by the presence of new symbols in the library. However, if
|
||||
a release includes layout changes to classes defined in the headers, this can lead to compatibility issues
|
||||
for applications that are partially recompiled with a mix of use of new and old headers. In such cases,
|
||||
it is recommended to recompile the entire application with the new version of oneTBB to ensure compatibility.
|
||||
|
||||
Through the most recent oneTBB release, we have maintained backwards compatibility. However, there have been
|
||||
layout changes in the 2023.0.0 and 2022.0.0 releases, which can lead to compatibility issues for applications
|
||||
that are partially recompiled with different versions of the library headers. We therefore increased the major
|
||||
version number for those releases to highlight the potential for compatibility issues and to encourage users to
|
||||
recompile their entire application and any plugins when upgrading to those versions.
|
||||
|
||||
Summary Table
|
||||
-------------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: auto
|
||||
|
||||
* - Release Version
|
||||
- Binary Version / Interface Version
|
||||
- Date
|
||||
- Release Notes
|
||||
- API Changes
|
||||
- ABI Changes
|
||||
|
||||
* - :ref:`2023.0.0 <version-2023.0.0>`
|
||||
- 12.18 / 12180
|
||||
- April 2026
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20230-release-notes>`_
|
||||
- Yes
|
||||
- Layout changes
|
||||
|
||||
* - :ref:`2022.3.0 <version-2022.3.0>`
|
||||
- 12.17 / 12170
|
||||
- Oct 2025
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20223-release-notes>`_
|
||||
- Yes
|
||||
- New entry points
|
||||
|
||||
* - :ref:`2022.2.0 <version-2022.2.0>`
|
||||
- 12.16 / 12160
|
||||
- Jun 2025
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20222-release-notes>`_
|
||||
- No
|
||||
- No
|
||||
|
||||
* - :ref:`2022.1.0 <version-2022.1.0>`
|
||||
- 12.15 / 12150
|
||||
- Mar 2025
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20221-release-notes>`_
|
||||
- Yes
|
||||
- New entry points
|
||||
|
||||
* - :ref:`2022.0.0 <version-2022.0.0>`
|
||||
- 12.14 / 12140
|
||||
- Oct 2024
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20220-release-notes>`_
|
||||
- Yes
|
||||
- New entry points and layout changes
|
||||
|
||||
* - :ref:`2021.13.0 <version-2021.13.0>`
|
||||
- 12.13 / 12130
|
||||
- Jun 2024
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-202113-release-notes>`_
|
||||
- Yes
|
||||
- No
|
||||
|
||||
* - :ref:`2021.12.0 <version-2021.12.0>`
|
||||
- 12.12 / 12120
|
||||
- Apr 2024
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-202112-release-notes>`_
|
||||
- No
|
||||
- No
|
||||
|
||||
* - :ref:`2021.11.0 <version-2021.11.0>`
|
||||
- 12.11 / 12110
|
||||
- Nov 2023
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-202111-release-notes>`_
|
||||
- No
|
||||
- No
|
||||
|
||||
* - :ref:`2021.10.0 <version-2021.10.0>`
|
||||
- 12.10 / 12100
|
||||
- Jul 2023
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-202110-release-notes>`_
|
||||
- Yes
|
||||
- No
|
||||
|
||||
* - :ref:`2021.9.0 <version-2021.9.0>`
|
||||
- 12.9 / 12090
|
||||
- Apr 2023
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20219-release-notes>`_
|
||||
- Yes
|
||||
- No
|
||||
|
||||
* - :ref:`2021.8.0 <version-2021.8.0>`
|
||||
- 12.8 / 12080
|
||||
- Feb 2023
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20218-release-notes>`_
|
||||
- Yes
|
||||
- No
|
||||
|
||||
* - :ref:`2021.7.0 <version-2021.7.0>`
|
||||
- 12.7 / 12070
|
||||
- Oct 2022
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20217-release-notes>`_
|
||||
- No
|
||||
- No
|
||||
|
||||
* - :ref:`2021.6.0 <version-2021.6.0>`
|
||||
- 12.6 / 12060
|
||||
- Sep 2022
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20216-release-notes>`_
|
||||
- Yes
|
||||
- No
|
||||
|
||||
* - :ref:`2021.5.0 <version-2021.5.0>`
|
||||
- 12.5 / 12050
|
||||
- Dec 2021
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20215-release-notes>`_
|
||||
- Yes
|
||||
- No
|
||||
|
||||
* - :ref:`2021.4.0 <version-2021.4.0>`
|
||||
- 12.4 / 12040
|
||||
- Oct 2021
|
||||
- `Release Notes <https://github.com/uxlfoundation/oneTBB/blob/master/RELEASE_NOTES.md#onetbb-20214-release-notes>`_
|
||||
- Yes
|
||||
- New entry points
|
||||
|
||||
* - :ref:`2021.3.0 <version-2021.3.0>`
|
||||
- 12.3 / 12030
|
||||
- Jun 2021
|
||||
- `Release Notes <https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-threading-building-blocks-release-notes.html>`_
|
||||
- Yes
|
||||
- New entry points
|
||||
|
||||
* - :ref:`2021.2.0 <version-2021.2.0>`
|
||||
- 12.2 / 12020
|
||||
- Apr 2021
|
||||
- `Release Notes <https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-threading-building-blocks-release-notes.html>`_
|
||||
- Yes
|
||||
- New entry points
|
||||
|
||||
* - :ref:`2021.1.1 <version-2021.1.1>`
|
||||
- 12.1 / 12010
|
||||
- Dec 2020
|
||||
- `Release Notes <https://www.intel.com/content/www/us/en/developer/articles/release-notes/intel-oneapi-threading-building-blocks-release-notes.html>`_
|
||||
- Initial oneTBB API
|
||||
- Initial oneTBB ABI
|
||||
|
||||
Release Details
|
||||
---------------
|
||||
|
||||
.. _version-2023.0.0:
|
||||
|
||||
2023.0.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- :onetbb-spec:`Function create_numa_task_arenas introduced to create a set of NUMA bound arenas <task_scheduler/task_arena/task_arena_cls>`
|
||||
- :doc:`Additional deduction guides for flow graph <../tbb_userguide/fg_ctad>`
|
||||
- :onetbb-spec:`Additional deduction guides for blocked_range_nd <algorithms/blocked_ranges/blocked_nd_range_cls>`
|
||||
- flow graph :onetbb-spec:`indexer_node <flow_graph/indexer_node_cls>` and :onetbb-spec:`join_node <flow_graph/join_node_cls>` now support 10 or more input ports
|
||||
- :doc:`Preview Feature: wait for single task in task_group <../reference/task_group_ext/wait_single_task>`
|
||||
- :doc:`Preview Feature: resource_limited_node and resource_limiter classes <../reference/fg_resource_limiting>`
|
||||
- :doc:`Preview Feature: advanced core-type selection <../reference/core_type_selector>`
|
||||
- :doc:`Preview Feature: global control parameter for default block time behavior <../reference/parallel_phase_for_task_arena>`
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- ordered container layout changes for scalability improvements that impact concurrent_map, concurrent_multimap, concurrent_set,
|
||||
and concurrent_multiset
|
||||
|
||||
**Notes:**
|
||||
|
||||
The ABI is backwards compatible but issues can arise for partial recomplilation cases when objects with modified layouts are passed
|
||||
across compilation units built against headers with the older layout.
|
||||
|
||||
.. _version-2022.3.0:
|
||||
|
||||
2022.3.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- :onetbb-spec:`task_arena::enqueue and task_arena::wait_for to enqueue to and wait for specific task_group <task_scheduler/task_arena/task_arena_cls>`
|
||||
- :doc:`custom assertion handler support <../reference/assertion_handler>`
|
||||
- :doc:`Preview Feature: dynamic task graph <../reference/task_group_dynamic_dependencies>`
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- set/get_assertion_handler
|
||||
- current_task_ptr
|
||||
|
||||
**Notes:**
|
||||
|
||||
set/get_assertion_handler symbols are used by custom assertion handler support, current_task_ptr is used by preview of task_group dependencies
|
||||
|
||||
.. _version-2022.2.0:
|
||||
|
||||
2022.2.0
|
||||
~~~~~~~~
|
||||
|
||||
No API or ABI changes in this release.
|
||||
|
||||
.. _version-2022.1.0:
|
||||
|
||||
2022.1.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Added explicit deduction guides for blocked_nd_range <https://github.com/uxlfoundation/oneTBB/tree/v2022.1.0/rfcs/experimental/blocked_nd_range_ctad>`_
|
||||
- `preview of parallel phase <https://github.com/uxlfoundation/oneTBB/tree/v2022.1.0/rfcs/experimental/parallel_phase_for_task_arena>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- enter/exit_parallel_phase
|
||||
|
||||
**Notes:**
|
||||
|
||||
enter/exit_parallel_phase is only used by preview of parallel phase. **WARNING:** there was temporary, inadvertent change that made the `unsafe_wait <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/task_scheduler/scheduling_controls/task_scheduler_handle_cls>`_ exception local for this release only.
|
||||
|
||||
.. _version-2022.0.0:
|
||||
|
||||
2022.0.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Preview of flow graph try_put_and_wait <https://github.com/uxlfoundation/oneTBB/pull/1513>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- get_thread_reference_vertex
|
||||
- execution_slot
|
||||
|
||||
**Notes:**
|
||||
|
||||
`The layouts of task_group and flow::graph were changed to improve scalability. The binary library is backwards compatible
|
||||
but issues can arise for partial recomplilation cases (see linked discussion) <https://github.com/uxlfoundation/oneTBB/discussions/1371>`_. get_thread_reference_vertex and execution_slot added for scalability improvements.
|
||||
|
||||
.. _version-2021.13.0:
|
||||
|
||||
2021.13.0
|
||||
~~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Better rvalues support for parallel_reduce and parallel_deterministic_reduce functional API <https://github.com/uxlfoundation/oneTBB/pull/1307>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
No ABI changes in this release.
|
||||
|
||||
.. _version-2021.12.0:
|
||||
|
||||
2021.12.0
|
||||
~~~~~~~~~
|
||||
|
||||
No API or ABI changes in this release.
|
||||
|
||||
.. _version-2021.11.0:
|
||||
|
||||
2021.11.0
|
||||
~~~~~~~~~
|
||||
|
||||
No API or ABI changes in this release.
|
||||
|
||||
**Notes:**
|
||||
|
||||
Thread Composability Manager support introduced. It can be enabled by setting "TCM_ENABLE" environmental variable to 1
|
||||
|
||||
.. _version-2021.10.0:
|
||||
|
||||
2021.10.0
|
||||
~~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `parallel algorithms and Flow Graph nodes allowed to accept pointers to the member functions and member objects as the user-provided callables <https://github.com/uxlfoundation/oneTBB/pull/880>`_
|
||||
- `Added missed member functions, such as assignment operators and swap function, to the concurrent_queue and concurrent_bounded_queue containers <https://github.com/uxlfoundation/oneTBB/pull/1033>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
No ABI changes in this release.
|
||||
|
||||
.. _version-2021.9.0:
|
||||
|
||||
2021.9.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Hybrid core type constraints are fully supported and no longer guarded by preview macro <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/v1.2-rev-1/elements/onetbb/source/task_scheduler/task_arena/task_arena_cls#_CPPv4N11constraints9core_typeE>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
No ABI changes in this release.
|
||||
|
||||
**Notes:**
|
||||
|
||||
Hybrid CPU support is now production features, including use of symbols introduced in 2021.2.0
|
||||
|
||||
.. _version-2021.8.0:
|
||||
|
||||
2021.8.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Fixed concurrent_bounded_queue return type to match specification <https://github.com/uxlfoundation/oneTBB/issues/807>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
No ABI changes in this release.
|
||||
|
||||
.. _version-2021.7.0:
|
||||
|
||||
2021.7.0
|
||||
~~~~~~~~
|
||||
|
||||
No API or ABI changes in this release.
|
||||
|
||||
.. _version-2021.6.0:
|
||||
|
||||
2021.6.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Improved support and use of the latest C++ standards for parallel_sort that allows using this algorithm with user-defined and standard library-defined objects with modern semantics <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/v1.2-rev-1/elements/onetbb/source/algorithms/functions/parallel_sort_func>`_
|
||||
- The following features are now fully functional: `task_arena extensions <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/v1.2-rev-1/elements/onetbb/source/task_scheduler/task_arena/task_arena_cls>`_, `collaborative_call_once <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onetbb/source/algorithms/functions/collaborative_call_once_func>`_, heterogeneous overloads for concurrent_hash_map, and `task_scheduler_handle <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/v1.2-rev-1/elements/onetbb/source/task_scheduler/scheduling_controls/task_scheduler_handle_cls>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
No ABI changes in this release.
|
||||
|
||||
.. _version-2021.5.0:
|
||||
|
||||
2021.5.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- Preview of task_group interface with a new run_and_wait overload to accept task_handle
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
No ABI changes in this release.
|
||||
|
||||
.. _version-2021.4.0:
|
||||
|
||||
2021.4.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- Preview of collaborative_call_once algorithm
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- notify_waiters
|
||||
|
||||
.. _version-2021.3.0:
|
||||
|
||||
2021.3.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- Extended the high-level task API to simplify migration from TBB to oneTBB
|
||||
- Added mutex and rw_mutex that are suitable for long critical sections and resistant to high contention
|
||||
- Added ability to customize the concurrent_hash_map mutex type
|
||||
- Added heterogeneous lookup, erase, and insert operations to concurrent_hash_map
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- enqueue(d1::task&, d1::task_group_context&, d1::task_arena_base*)
|
||||
- is_writer for queuing_rw_mutex
|
||||
- wait_on_address
|
||||
- notify_by_address/address_all/address_one
|
||||
|
||||
.. _version-2021.2.0:
|
||||
|
||||
2021.2.0
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- Three-way comparison operators for concurrent ordered containers and concurrent_vector
|
||||
- Preview of Hybrid core type constraints
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- core_type_count
|
||||
- fill_core_type_indices
|
||||
- constraints_threads_per_core
|
||||
- constraints_default_concurrency
|
||||
|
||||
**Notes:**
|
||||
|
||||
New symbols used by preview of Hybrid CPU support (entered production in 2021.9).
|
||||
|
||||
.. _version-2021.1.1:
|
||||
|
||||
2021.1.1
|
||||
~~~~~~~~
|
||||
|
||||
**API Changes:**
|
||||
|
||||
- `Initial modernized oneTBB API <https://oneapi-spec.uxlfoundation.org/specifications/oneapi/v1.0-rev-3/elements/onetbb/source/nested-index#onetbb-section>`_
|
||||
|
||||
**ABI Changes:**
|
||||
|
||||
- Initial oneTBB ABI
|
||||
@@ -10,6 +10,6 @@ Getting Help and Support
|
||||
.. rubric:: Getting Technical Support
|
||||
:class: sectiontitle
|
||||
|
||||
For general information about oneTBB technical support, product
|
||||
For general information about |short_name| technical support, product
|
||||
updates, user forums, FAQs, tips and tricks and other support
|
||||
questions, go to `GitHub issues <https://github.com/oneapi-src/oneTBB/issues>`_.
|
||||
questions, see `oneTBB Support <https://github.com/uxlfoundation/oneTBB/blob/master/SUPPORT.md>`_.
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
.. _limitations:
|
||||
|
||||
Known Limitations
|
||||
*****************
|
||||
|
||||
This page outlines the known limitations of oneTBB to help you better understand its capabilities.
|
||||
|
||||
Debug TBB In The SYCL Program
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** The application may crash when using the Debug version of oneTBB in a SYCL program compiled with Intel(R) oneAPI DPC++/C++ Compiler. This happens because both ``tbb`` (Release version) and ``tbb_debug`` (Debug version) libraries load simultaneously, causing conflicts.
|
||||
|
||||
**Solution:** Do one of the following:
|
||||
|
||||
* Link the application with the Release version ``tbb`` instead of ``tbb_debug``.
|
||||
* Use the ``qtbb`` flag provided by the Intel(R) oneAPI DPC++/C++ Compiler.
|
||||
|
||||
Static Linking Possible But Not Recommended
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** Building and using oneTBB as a static library reduces the benefits of the shared thread pool and limits library functionality.
|
||||
|
||||
**Risks:** See :ref:`Static Linking of oneTBB <static_linking>` for why the shared library is the preferred form, which features are unavailable in a static library, and the risks of having more than one copy of oneTBB in a process.
|
||||
|
||||
**Solution:** Prefer the shared library. If a static library is required, follow :ref:`Recommendations If You Must Link Statically <static_linking_recommendations>` and see `Building oneTBB as a Static Library <https://github.com/uxlfoundation/oneTBB/blob/master/cmake/README.md#building-onetbb-as-a-static-library>`_ for build instructions.
|
||||
|
||||
Freestanding Compilation Mode
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** oneTBB does not support the freestanding compilation mode.
|
||||
|
||||
**Risk:** Compiling an application that utilizes oneTBB headers using the Intel(R) oneAPI DPC++/C++ Compiler may result in failure on Windows* OS if the ``/Qfreestanding`` compiler option is employed.
|
||||
|
||||
Static Assert
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** A static assert causes the compilation failures in oneTBB headers if the following conditions are satisfied:
|
||||
|
||||
* Compilation is done with Clang 12.0.0 or a more recent version.
|
||||
* The LLVM standard library is employed, coupled with the use of the ``-ffreestanding`` flag and C++11/14 compiler options.
|
||||
|
||||
**Risk:** The compilation failures.
|
||||
|
||||
Interface Incompatibilities: TBB vs oneTBB
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** An application using Parallel STL algorithms in the ``libstdc++`` versions 9 and 10 may fail to compile due to incompatible interface changes between earlier versions of Threading Building Blocks (TBB) and oneAPI Threading Building Blocks (oneTBB).
|
||||
|
||||
**Solution:** Disable support for Parallel STL algorithms by defining ``PSTL_USE_PARALLEL_POLICIES`` (in libstdc++ 9) or ``_GLIBCXX_USE_TBB_PAR_BACKEND`` (in libstdc++ 10) macro to zero before inclusion of the first standard header file in each translation unit.
|
||||
|
||||
Incorrect Installation Location
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** On Linux* OS, if oneAPI Threading Building Blocks (oneTBB) or Threading Building Blocks (TBB) are installed in a system folder, such as ``/usr/lib64``, the application may fail to link due to the order in which the linker searches for libraries.
|
||||
|
||||
**Risk:** The issue does not affect the program execution.
|
||||
|
||||
**Solution:** Use the ``-L`` linker option to specify the correct location of oneTBB library.
|
||||
|
||||
``fork()`` Support
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** oneTBB does not support ``fork()``.
|
||||
|
||||
**Solution:** To work-around the issue, consider using ``task_scheduler_handle`` to join oneTBB worker threads before using ``fork()``.
|
||||
|
||||
Dynamic Malloc Replacement and Topology API Incompatibilities
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
**Limitation:** On Linux* OS, using dynamic malloc replacement with ``tbb::info`` and ``tbb::task_arena::constraints`` APIs may result in runtime failures.
|
||||
|
||||
**Solution:** Set ``TBB_ENABLE_SANITIZERS=1`` in the environment. This informs that dynamic malloc replacement is used.
|
||||
@@ -0,0 +1,111 @@
|
||||
.. _static_linking:
|
||||
|
||||
Static Linking of oneTBB
|
||||
************************
|
||||
|
||||
|full_name| is designed, built, and distributed as a shared library. Building a static
|
||||
library is possible, but it is not a recommended configuration. CMake emits a warning, validation
|
||||
coverage is limited, and several features are unavailable by default. If a static oneTBB
|
||||
library is used by an application, you should carefully validate its performance and correctness.
|
||||
|
||||
Using a static library is not a problem in itself. The problems arise when a static oneTBB
|
||||
library is combined with another static or shared oneTBB library in the same application.
|
||||
In the good case, this is a potential performance problem due to oversubscription but in the
|
||||
worst case, something fails in a way that is hard to diagnose.
|
||||
|
||||
This page explains why the shared library is the recommended form, what can go wrong for
|
||||
performance and for correctness when more than one copy of oneTBB ends up in the same process,
|
||||
which features are unavailable in a static build, and how to produce a static build anyway.
|
||||
|
||||
Why a Shared Library Is Recommended
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
oneTBB's thread pool is used to manage a machine's hardware threads. To do that job well,
|
||||
the oneTBB task scheduler and its worker thread pool must have a single instance across
|
||||
the entire process. The most practical way to create a program-wide singleton is to put
|
||||
it in a shared library that every component links against.
|
||||
|
||||
Performance Risks of Multiple oneTBB Copies
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Performance problems can arise because each instance of oneTBB creates roughly as many worker
|
||||
threads as there are hardware threads. If a program contains ``k`` independent oneTBB schedulers,
|
||||
it gets ``k`` times as many software threads as hardware threads. This oversubscription may
|
||||
cause excessive context switching and cache contention.
|
||||
|
||||
This oversubscription issue is most noticeable when nested parallelism is used. If a oneTBB
|
||||
algorithm or task calls into a library that uses a different oneTBB instance, the number
|
||||
of threads increases and the tasks in each layer become isolated from each other, limiting
|
||||
flexibility in work stealing and load balancing. This is the case when parallelism at the
|
||||
application level is combined with parallelism at the library level.
|
||||
|
||||
Oversubscription also cannot be capped from a single place. A ``tbb::global_control`` object
|
||||
that limits ``max_allowed_parallelism`` constrains only the copy of oneTBB it was created in,
|
||||
so the other copies keep creating their own worker threads.
|
||||
|
||||
Correctness Risks of Multiple oneTBB Copies
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Beyond performance, mixing copies may break correctness. There are a number of subtle issues
|
||||
that can arise. One example is that oneTBB objects can carry state that belongs to the copy
|
||||
that created it, including task arenas, scheduler state stored in thread-local storage, etc.
|
||||
Passing a ``tbb::task_arena``, ``tbb::task_group``, ``tbb::flow::graph``, or other oneTBB
|
||||
object to a component that uses a different copy of oneTBB is undefined behavior.
|
||||
|
||||
Settings that are documented as process-wide also stop behaving that way. ``tbb::global_control``
|
||||
applies only to the scheduler instance it is created in, not to the other copies, so a component
|
||||
cannot rely on it to establish an application-wide policy.
|
||||
|
||||
Features Not Available in a Static Build
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A static build disables oneTBB's run-time dynamic loading, which several features depend on:
|
||||
|
||||
* The ``tbbbind`` libraries are not built, and oneTBB cannot load them at run time.
|
||||
``tbb::info`` and ``tbb::task_arena::constraints`` therefore cannot report or apply
|
||||
topology-based constraints.
|
||||
|
||||
* ``tbbmalloc_proxy`` is not built. The scalable allocator is still usable through the
|
||||
explicit interfaces, such as ``tbb::scalable_allocator``, ``tbb::cache_aligned_allocator``,
|
||||
and ``scalable_malloc``.
|
||||
|
||||
* oneTBB will not load the Thread Composability Manager (TCM) library at run time,
|
||||
so coordination with other threading runtimes through TCM is unavailable.
|
||||
|
||||
* IPO is enabled only for shared library builds, so a static oneTBB may be slower than
|
||||
the shared one even in the single-copy case.
|
||||
|
||||
.. _static_linking_recommendations:
|
||||
|
||||
Recommendations If You Must Link Statically
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you still choose to statically link oneTBB into your application, follow these
|
||||
recommendations:
|
||||
|
||||
* Use only a single copy of oneTBB for the entire application if possible.
|
||||
|
||||
* Detect additional copies at run time. Setting the ``TBB_VERSION`` environment variable to
|
||||
``1`` makes each initialized oneTBB instance print its version information to ``stderr``,
|
||||
so more than one block of output means more than one copy is loaded. See
|
||||
:ref:`Mixing_Two_Runtimes` for an example of the output.
|
||||
|
||||
* Do not pass oneTBB objects, such as ``tbb::task_arena``, ``tbb::task_group``, or
|
||||
``tbb::flow::graph``, across component boundaries unless all of the components share the
|
||||
same copy of oneTBB.
|
||||
|
||||
* Validate the performance and correctness of the resulting application yourself. Static
|
||||
builds receive only light validation coverage.
|
||||
|
||||
Building oneTBB as a Static Library
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The CMake build system supports static library builds.
|
||||
|
||||
Configure the build with ``BUILD_SHARED_LIBS=OFF``. The configure step prints a warning
|
||||
stating that the configuration is highly discouraged, but the build proceeds.
|
||||
|
||||
For the full procedure, including the effects on the rest of the build configuration and how
|
||||
to consume the result, see `Building oneTBB as a Static Library
|
||||
<https://github.com/uxlfoundation/oneTBB/blob/master/cmake/README.md#building-onetbb-as-a-static-library>`_
|
||||
in the Build System Description.
|
||||
@@ -11,7 +11,7 @@ There are four main types of errors/hazards you can encounter in the development
|
||||
* Race conditions and deadlocks
|
||||
|
||||
|short_name| testing approach is designed to provide high coverage of these error types.
|
||||
All types of errors are covered with unit testing and review.
|
||||
All types of errors are covered with unit testing and code review.
|
||||
|
||||
Code coverage metrics are tracked to ensure high code coverage with tests. Uncovered branches are analyzed manually.
|
||||
Memory errors and data races are additionally covered by special tools that include thread and memory sanitizers.
|
||||
@@ -19,11 +19,11 @@ Memory errors and data races are additionally covered by special tools that incl
|
||||
Race conditions and deadlocks are the most complicated errors.
|
||||
They are covered by:
|
||||
|
||||
* **Unit tests** that, however, have limited capability to catch such errors
|
||||
* **Unit tests** that, however, have limited capability to catch such errors.
|
||||
* **Integration tests**. Multiple different functionalities are heavily combined to emulate user use cases that may trigger such errors based on prior knowledge and expertise.
|
||||
* **Stress testing with different possible combinations**. It ensures that even rarely triggered error conditions are caught by testing.
|
||||
|
||||
.. note:: Every fix is required to be covered by a test to guarantee the detection of such issues in the future.
|
||||
.. note:: Every fix is required to be covered by a regression test to guarantee the detection of such issues in the future.
|
||||
|
||||
Continuous Integration triggers all the tests on each commit. This ensures that:
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
.. _assertion_handler:
|
||||
|
||||
Custom Assertion Handler
|
||||
========================
|
||||
|
||||
.. note::
|
||||
The availability of the extension can be checked with the ``TBB_EXT_CUSTOM_ASSERTION_HANDLER`` macro defined in
|
||||
``oneapi/tbb/global_control.h`` and ``oneapi/tbb/version.h`` headers.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
Description
|
||||
***********
|
||||
|
||||
oneTBB implements assertion checking that detects errors in header files and library code. While most assertions are
|
||||
active in debug builds (controlled by ``TBB_USE_ASSERT``), some assertions remain present in release builds. By
|
||||
default, failed assertions display an error message and terminate the application. The custom assertion handler
|
||||
mechanism extends this by allowing developers to implement their own assertion handling functions. The API is
|
||||
semantically similar to the standard ``std::set_terminate`` and ``std::get_terminate`` functions.
|
||||
|
||||
API
|
||||
***
|
||||
|
||||
Header
|
||||
------
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#include <oneapi/tbb/global_control.h>
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#define TBB_EXT_CUSTOM_ASSERTION_HANDLER 202510
|
||||
|
||||
namespace oneapi {
|
||||
namespace tbb {
|
||||
namespace ext {
|
||||
using assertion_handler_type = void(*)(const char* location, int line,
|
||||
const char* expression, const char* comment);
|
||||
|
||||
assertion_handler_type set_assertion_handler(assertion_handler_type new_handler) noexcept;
|
||||
|
||||
assertion_handler_type get_assertion_handler() noexcept;
|
||||
}}}
|
||||
|
||||
Types
|
||||
-----
|
||||
|
||||
.. cpp:type:: assertion_handler_type
|
||||
|
||||
Type alias for the pointer to an assertion handler function.
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
.. cpp:function:: assertion_handler_type set_assertion_handler(assertion_handler_type new_handler) noexcept
|
||||
|
||||
Sets the provided assertion handler and returns the previous handler. If ``new_handler`` is ``nullptr``, resets to the
|
||||
default handler.
|
||||
|
||||
.. note:: ``new_handler`` must terminate the program without returning. Otherwise the behavior is undefined.
|
||||
|
||||
.. cpp:function:: assertion_handler_type get_assertion_handler() noexcept
|
||||
|
||||
Returns the current assertion handler.
|
||||
|
||||
Example
|
||||
*******
|
||||
|
||||
.. literalinclude:: ./examples/assertion_handler.cpp
|
||||
:language: c++
|
||||
:start-after: /*begin_assertion_handler_example*/
|
||||
:end-before: /*end_assertion_handler_example*/
|
||||
|
||||
.. rubric:: See also
|
||||
|
||||
* :onetbb-spec:`Enabling Debugging Features specification <configuration/enabling_debugging_features>`
|
||||
@@ -1,118 +0,0 @@
|
||||
.. _constraints_extensions:
|
||||
|
||||
task_arena::constraints extensions
|
||||
======================================
|
||||
|
||||
.. note::
|
||||
To enable this feature, set the ``TBB_PREVIEW_TASK_ARENA_CONSTRAINTS_EXTENSION`` macro to 1.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
Description
|
||||
***********
|
||||
|
||||
These extensions allow to customize ``tbb::task_arena::constraints`` with the following properties:
|
||||
|
||||
* On machines with Intel® Hybrid Technology set the preferred core type for threads working within the task arena.
|
||||
* Limit the maximum number of threads that can be scheduled to one core simultaneously.
|
||||
|
||||
API
|
||||
***
|
||||
|
||||
Header
|
||||
------
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#include <oneapi/tbb/task_arena.h>
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
namespace oneapi {
|
||||
namespace tbb {
|
||||
|
||||
class task_arena {
|
||||
public:
|
||||
struct constraints {
|
||||
constraints& set_numa_id(numa_node_id id);
|
||||
constraints& set_max_concurrency(int maximal_concurrency);
|
||||
constraints& set_core_type(core_type_id id);
|
||||
constraints& set_max_threads_per_core(int threads_number);
|
||||
|
||||
numa_node_id numa_id = task_arena::automatic;
|
||||
int max_concurrency = task_arena::automatic;
|
||||
core_type_id core_type = task_arena::automatic;
|
||||
int max_threads_per_core = task_arena::automatic;
|
||||
}; // struct constraints
|
||||
}; // class task_arena
|
||||
|
||||
} // namespace tbb
|
||||
} // namespace oneapi
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
.. cpp:function:: constraints& set_numa_id(numa_node_id id)
|
||||
|
||||
Sets the ``numa_id`` field to the ``id``.
|
||||
|
||||
**Returns:** Reference to ``*this``.
|
||||
|
||||
.. cpp:function:: constraints& set_max_concurrency(int maximal_concurrency)
|
||||
|
||||
Sets the ``max_concurrency`` field to the ``maximal_concurrency``.
|
||||
|
||||
**Returns:** Reference to ``*this``.
|
||||
|
||||
.. cpp:function:: constraints& set_core_type(core_type_id id)
|
||||
|
||||
Sets the ``core_type`` field to the ``id``.
|
||||
|
||||
**Returns:** Reference to ``*this``.
|
||||
|
||||
.. cpp:function:: constraints& set_max_threads_per_core(int threads_number)
|
||||
|
||||
Sets the ``max_threads_per_core`` field to the ``threads_number``.
|
||||
|
||||
**Returns:** Reference to ``*this``.
|
||||
|
||||
Member Objects
|
||||
--------------
|
||||
|
||||
.. cpp:member:: numa_node_id numa_id
|
||||
|
||||
An integral logical index uniquely identifying a NUMA node. All threads joining the
|
||||
``task_arena`` are bound to this NUMA node.
|
||||
|
||||
.. note::
|
||||
|
||||
To obtain a valid NUMA node ID, call ``oneapi::tbb::info::numa_nodes()``.
|
||||
|
||||
.. cpp:member:: int max_concurrency
|
||||
|
||||
The maximum number of threads that can participate in work processing within the
|
||||
``task_arena`` at the same time.
|
||||
|
||||
|
||||
.. cpp:member:: core_type_id core_type
|
||||
|
||||
An integral logical index uniquely identifying a core type. All threads joining the
|
||||
``task_arena`` are bound to this core type.
|
||||
|
||||
.. note::
|
||||
|
||||
To obtain a valid core type node ID, call ``oneapi::tbb::info::core_types()``.
|
||||
|
||||
.. cpp:member:: int max_threads_per_core
|
||||
|
||||
The maximum number of threads that can be scheduled to one core simultaneously.
|
||||
|
||||
See also:
|
||||
|
||||
* :doc:`oneapi::tbb::info namespace preview extensions <info_namespace_extensions>`
|
||||
* `oneapi::tbb::task_arena specification <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/task_scheduler/task_arena/task_arena_cls.html>`_
|
||||
@@ -0,0 +1,195 @@
|
||||
.. _core_type_selector:
|
||||
|
||||
Core Type Selector for Task Arena Constraints
|
||||
=============================================
|
||||
|
||||
.. note::
|
||||
To enable this feature, set the ``TBB_PREVIEW_TASK_ARENA_CORE_TYPE_SELECTOR`` macro to 1. When available and enabled, the feature-test macro ``TBB_HAS_TASK_ARENA_CORE_TYPE_SELECTOR`` is defined.
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
Description
|
||||
***********
|
||||
|
||||
On a system with hybrid CPU cores, it is generally best to allow the OS to schedule threads across
|
||||
all core types. However, advanced users may occasionally need to constrain the scheduling.
|
||||
The ``constraints::set_core_type(core_type_id)`` API supports only a single core type, which may not allow selecting a suitable subset on processors with more than two core types.
|
||||
|
||||
The core type selector addresses this by allowing a callable object (*selector*) to rank every
|
||||
available core type. The selector is called once for each core type returned by
|
||||
``tbb::info::core_types()``. Positive scores indicate core types that should be used, negative
|
||||
scores exclude core types, and a score of zero means "use only if multi-core-type constraints are
|
||||
not supported" (see `Selector Requirements`_ for details).
|
||||
|
||||
This feature extends the :onetbb-spec:`tbb::task_arena <task_scheduler/task_arena/task_arena_cls>`
|
||||
and the :onetbb-spec:`tbb::info <info_namespace>` specifications with the following API:
|
||||
|
||||
* Adds the ``selectable`` constant to ``task_arena``.
|
||||
* Adds a new ``task_arena`` constructor template that accepts a ``constraints`` object together with
|
||||
a selector.
|
||||
* Adds a new ``task_arena::initialize`` template that accepts a ``constraints`` object together with
|
||||
a selector.
|
||||
* Adds a new ``info::default_concurrency`` template that returns the effective concurrency for given
|
||||
constraints and selector.
|
||||
|
||||
API
|
||||
***
|
||||
|
||||
Header
|
||||
------
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#define TBB_PREVIEW_TASK_ARENA_CORE_TYPE_SELECTOR 1
|
||||
#include <oneapi/tbb/task_arena.h>
|
||||
#include <oneapi/tbb/info.h>
|
||||
|
||||
Synopsis
|
||||
--------
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
namespace oneapi {
|
||||
namespace tbb {
|
||||
|
||||
class task_arena {
|
||||
public:
|
||||
static constexpr int selectable = /* unspecified */;
|
||||
|
||||
template <typename Selector>
|
||||
task_arena(constraints a_constraints, Selector a_selector,
|
||||
unsigned reserved_slots = 1,
|
||||
priority a_priority = priority::normal);
|
||||
|
||||
template <typename Selector>
|
||||
void initialize(constraints a_constraints, Selector a_selector,
|
||||
unsigned reserved_slots = 1,
|
||||
priority a_priority = priority::normal);
|
||||
}; // class task_arena
|
||||
|
||||
namespace info {
|
||||
template <typename Selector>
|
||||
int default_concurrency(task_arena::constraints c, Selector a_selector);
|
||||
} // namespace info
|
||||
|
||||
} // namespace tbb
|
||||
} // namespace oneapi
|
||||
|
||||
Member Constants
|
||||
----------------
|
||||
|
||||
.. cpp:var:: static constexpr int task_arena::selectable
|
||||
|
||||
A special value for ``constraints::core_type`` that indicates the core type(s) should be
|
||||
determined by the selector provided to the constructor or ``initialize``.
|
||||
|
||||
Member Functions
|
||||
----------------
|
||||
|
||||
.. cpp:function:: template <typename Selector> \
|
||||
task_arena::task_arena(constraints a_constraints, Selector a_selector, \
|
||||
unsigned reserved_slots = 1, \
|
||||
priority a_priority = priority::normal)
|
||||
|
||||
**Requirements**: ``Selector`` must be a callable type whose call operator accepts a
|
||||
``std::tuple<tbb::core_type_id, std::size_t, std::size_t>`` and returns a value convertible to ``int``.
|
||||
See `Selector Requirements`_ for the full contract.
|
||||
|
||||
Constructs a ``task_arena`` whose core type constraint is resolved by calling ``a_selector``
|
||||
on every available core type. The ``a_constraints.core_type`` field should be set to
|
||||
``task_arena::selectable``; other constraint fields (``numa_id``, ``max_concurrency``,
|
||||
``max_threads_per_core``) are applied as usual.
|
||||
|
||||
If ``a_constraints.core_type`` is not ``selectable``, the selector is ignored and the
|
||||
constructor behaves identically to the existing constraints-based constructor.
|
||||
|
||||
.. cpp:function:: template <typename Selector> \
|
||||
void task_arena::initialize(constraints a_constraints, Selector a_selector, \
|
||||
unsigned reserved_slots = 1, \
|
||||
priority a_priority = priority::normal)
|
||||
|
||||
Overrides the arena settings and forces initialization. Core type resolution follows the same
|
||||
rules as the constructor above.
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
.. cpp:function:: template <typename Selector> \
|
||||
int info::default_concurrency(task_arena::constraints c, Selector a_selector)
|
||||
|
||||
**Requirements**: ``Selector`` must be a callable type whose call operator accepts a
|
||||
``std::tuple<tbb::core_type_id, std::size_t, std::size_t>`` and returns a value convertible to ``int``.
|
||||
See `Selector Requirements`_ for the full contract.
|
||||
|
||||
Returns the number of threads that would be available for a ``task_arena`` created with the
|
||||
given constraints and selector. If ``c.core_type`` is ``selectable``, the selector is applied
|
||||
to resolve the core type constraint before computing concurrency; otherwise, the selector is
|
||||
ignored and the function behaves identically to the single-argument ``info::default_concurrency``.
|
||||
|
||||
Selector Requirements
|
||||
*********************
|
||||
|
||||
A selector is a callable object whose call operator has the following effective signature:
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
int operator()(std::tuple<tbb::core_type_id, std::size_t, std::size_t> core_type_info) const;
|
||||
|
||||
The tuple elements are:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 15 20 65
|
||||
|
||||
* - Index
|
||||
- Type
|
||||
- Description
|
||||
* - 0
|
||||
- ``tbb::core_type_id``
|
||||
- The core type identifier, as returned by ``tbb::info::core_types()``.
|
||||
* - 1
|
||||
- ``std::size_t``
|
||||
- Zero-based position of this core type in the vector returned by
|
||||
``tbb::info::core_types()`` (ordered from least to most performant).
|
||||
* - 2
|
||||
- ``std::size_t``
|
||||
- Total number of available core types (``tbb::info::core_types().size()``).
|
||||
|
||||
The selector is called once for each core type. Its return value is interpreted as follows:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 80
|
||||
|
||||
* - Score
|
||||
- Meaning
|
||||
* - Positive
|
||||
- The core type is selected for use by the arena. A higher score indicates a
|
||||
stronger preference; if the implementation can only use a single core type,
|
||||
it selects the one with the highest score.
|
||||
* - Zero
|
||||
- The core type is used **only** if multi-core-type constraints are not supported
|
||||
by the implementation. When there are positive scores and the rest are zero,
|
||||
the zeros act as a fallback to no constraint (rather than falling back
|
||||
to the single best-scored type).
|
||||
* - Negative
|
||||
- The core type is excluded from use by the arena.
|
||||
|
||||
If all scores are negative, no core type constraint is applied. That is equivalent to
|
||||
setting ``constraints::core_type`` to ``automatic``.
|
||||
|
||||
Example
|
||||
*******
|
||||
|
||||
.. literalinclude:: ./examples/core_type_selector.cpp
|
||||
:language: c++
|
||||
:start-after: /*begin_core_type_selector_example*/
|
||||
:end-before: /*end_core_type_selector_example*/
|
||||
|
||||
In this example, a selector excludes the least performant core type (index 0) and ranks the
|
||||
remaining types by their position. The ``task_arena`` is created with
|
||||
``constraints::core_type`` set to ``selectable``, so the selector is invoked to determine
|
||||
which core types the arena may use. The ``info::default_concurrency`` overload with a selector
|
||||
is used to query the effective concurrency before creating the arena.
|
||||
@@ -50,7 +50,7 @@ Type requirements
|
||||
-----------------
|
||||
|
||||
The type of the mutex passed as a template argument for ``concurrent_hash_map`` should
|
||||
meet the requirements of `ReaderWriterMutex <https://spec.oneapi.com/versions/latest/elements/oneTBB/source/named_requirements/mutexes/rw_mutex.html>`_.
|
||||
meet the requirements of :onetbb-spec:`ReaderWriterMutex <named_requirements/mutexes/rw_mutex>`.
|
||||
It should also provide the following API:
|
||||
|
||||
.. cpp:function:: bool ReaderWriterMutex::scoped_lock::is_writer() const;
|
||||
@@ -67,92 +67,7 @@ and ``oneapi::tbb::rw_mutex`` meet the requirements above.
|
||||
The example below demonstrates how to wrap ``std::shared_mutex`` (C++17) to meet the requirements
|
||||
of `ReaderWriterMutex` and how to customize ``concurrent_hash_map`` to use this mutex.
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
#define TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1
|
||||
#include "oneapi/tbb/concurrent_hash_map.h"
|
||||
#include <shared_mutex>
|
||||
|
||||
class SharedMutexWrapper {
|
||||
public:
|
||||
// ReaderWriterMutex requirements
|
||||
|
||||
static constexpr bool is_rw_mutex = true;
|
||||
static constexpr bool is_recursive_mutex = false;
|
||||
static constexpr bool is_fair_mutex = false;
|
||||
|
||||
class scoped_lock {
|
||||
public:
|
||||
scoped_lock() : my_mutex_ptr(nullptr), my_writer_flag(false) {}
|
||||
scoped_lock(SharedMutexWrapper& mutex, bool write = true)
|
||||
: my_mutex_ptr(&mutex), my_writer_flag(write)
|
||||
{
|
||||
if (my_writer_flag) {
|
||||
my_mutex_ptr->my_mutex.lock();
|
||||
} else {
|
||||
my_mutex_ptr->my_mutex.lock_shared();
|
||||
}
|
||||
}
|
||||
|
||||
~scoped_lock() {
|
||||
if (my_mutex_ptr) release();
|
||||
}
|
||||
|
||||
void acquire(SharedMutexWrapper& mutex, bool write = true) {
|
||||
if (my_mutex_ptr) release();
|
||||
|
||||
my_mutex_ptr = &mutex;
|
||||
my_writer_flag = write;
|
||||
|
||||
if (my_writer_flag) {
|
||||
my_mutex_ptr->my_mutex.lock();
|
||||
} else {
|
||||
my_mutex_ptr->my_mutex.lock_shared();
|
||||
}
|
||||
}
|
||||
|
||||
void release() {
|
||||
if (my_writer_flag) {
|
||||
my_mutex_ptr->my_mutex.unlock();
|
||||
} else {
|
||||
my_mutex_ptr->my_mutex.unlock_shared();
|
||||
}
|
||||
}
|
||||
|
||||
bool upgrade_to_writer() {
|
||||
// std::shared_mutex does not have the upgrade/downgrade parallel_for_each_semantics
|
||||
if (my_writer_flag) return true; // Already a writer
|
||||
|
||||
my_mutex_ptr->my_mutex.unlock_shared();
|
||||
my_mutex_ptr->my_mutex.lock();
|
||||
return false; // The lock was reacquired
|
||||
}
|
||||
|
||||
bool downgrade_to_reader() {
|
||||
if (!my_writer_flag) return true; // Already a reader
|
||||
|
||||
my_mutex_ptr->my_mutex.unlock();
|
||||
my_mutex_ptr->my_mutex.lock_shared();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_writer() const {
|
||||
return my_writer_flag;
|
||||
}
|
||||
|
||||
private:
|
||||
SharedMutexWrapper* my_mutex_ptr;
|
||||
bool my_writer_flag;
|
||||
};
|
||||
private:
|
||||
std::shared_mutex my_mutex;
|
||||
}; // struct SharedMutexWrapper
|
||||
|
||||
int main() {
|
||||
using map_type = oneapi::tbb::concurrent_hash_map<int, int,
|
||||
oneapi::tbb::tbb_hash_compare<int>,
|
||||
oneapi::tbb::tbb_allocator<std::pair<const int, int>>,
|
||||
SharedMutexWrapper>;
|
||||
|
||||
map_type map; // This object will use SharedMutexWrapper for thread safety of insert/find/erase operations
|
||||
}
|
||||
.. literalinclude:: ./examples/custom_mutex_chmap_example.cpp
|
||||
:language: c++
|
||||
:start-after: /*begin_custom_mutex_chmap_example*/
|
||||
:end-before: /*end_custom_mutex_chmap_example*/
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_allocate_numa_interleaved_example*/
|
||||
#define TBB_PREVIEW_NUMA_ALLOCATION 1
|
||||
|
||||
#include <oneapi/tbb/numa_allocation.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
|
||||
int main() {
|
||||
std::size_t array_size = 10LLU * 1024 * 1024;
|
||||
double* ptr =
|
||||
(double*)oneapi::tbb::allocate_numa_interleaved(array_size * sizeof(double));
|
||||
if (!ptr)
|
||||
return -1;
|
||||
oneapi::tbb::parallel_for(std::size_t(0), array_size, [=](std::size_t i) {
|
||||
ptr[i] = i;
|
||||
});
|
||||
|
||||
oneapi::tbb::deallocate_numa_interleaved(ptr, array_size * sizeof(double));
|
||||
}
|
||||
/*end_allocate_numa_interleaved_example*/
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_allocate_numa_interleaved_pool_example*/
|
||||
#define TBB_PREVIEW_MEMORY_POOL 1
|
||||
#define TBB_PREVIEW_NUMA_ALLOCATION 1
|
||||
|
||||
#include <oneapi/tbb/numa_allocation.h>
|
||||
#include <oneapi/tbb/memory_pool.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
|
||||
class numa_interleaved_provider {
|
||||
static constexpr std::size_t page_size = 4 * 1024;
|
||||
public:
|
||||
// Guarantee that each allocation is a multiple of the system page size,
|
||||
// so allocate_numa_interleaved() requirements are satisfied.
|
||||
typedef std::array<char, page_size> value_type;
|
||||
numa_interleaved_provider() {}
|
||||
// Like std::allocator<T>::allocate, these functions expect the number of
|
||||
// objects of the same size as sizeof(value_type).
|
||||
void* allocate(std::size_t num_of_objects) {
|
||||
return oneapi::tbb::allocate_numa_interleaved(num_of_objects * sizeof(value_type));
|
||||
}
|
||||
void deallocate(void* ptr, std::size_t num_of_objects) {
|
||||
oneapi::tbb::deallocate_numa_interleaved(ptr, num_of_objects * sizeof(value_type));
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
// Memory pool requests memory in big chunks, slices them internally and uses
|
||||
// memory caching, so may improve performance for many small allocations and
|
||||
// scenarios with the objects reuse.
|
||||
oneapi::tbb::memory_pool<numa_interleaved_provider> pool;
|
||||
|
||||
oneapi::tbb::parallel_for(0, 1024*1024, [&pool](std::size_t) {
|
||||
// Temporary arrays allocated from the pool will reside in different
|
||||
// NUMA domains for better overall memory throughput.
|
||||
// As the pool caches the memory, on average it is faster than
|
||||
// allocate_numa_interleaved()/deallocate_numa_interleaved().
|
||||
double* ptr = (double*)pool.malloc(10*1000*sizeof(double));
|
||||
// ...
|
||||
pool.free(ptr);
|
||||
});
|
||||
|
||||
// std::vector uses interleaved NUMA memory
|
||||
using pool_allocator_t = oneapi::tbb::memory_pool_allocator<double>;
|
||||
std::vector<double, pool_allocator_t> values(pool_allocator_t{pool});
|
||||
values.push_back(3.14);
|
||||
}
|
||||
/*end_allocate_numa_interleaved_pool_example*/
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
Copyright (c) 2025 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_assertion_handler_example*/
|
||||
#include <oneapi/tbb/global_control.h>
|
||||
#include <fstream>
|
||||
|
||||
auto default_handler = tbb::get_assertion_handler();
|
||||
|
||||
void wrapper_assertion_handler(const char* location, int line,
|
||||
const char* expression, const char* comment) {
|
||||
// Execute a custom step before the default handler: log the assertion
|
||||
std::ofstream log{"example.log", std::ios::app};
|
||||
log << "Function: " << location << ", line: " << line << ", assertion "
|
||||
<< expression << " failed: " << comment << "\n";
|
||||
log.close();
|
||||
|
||||
default_handler(location, line, expression, comment);
|
||||
}
|
||||
|
||||
int main() {
|
||||
// Set custom handler
|
||||
tbb::set_assertion_handler(wrapper_assertion_handler);
|
||||
|
||||
// Use oneTBB normally - any assertion failures will use custom handler
|
||||
// ...
|
||||
|
||||
// Restore the default handler
|
||||
tbb::set_assertion_handler(nullptr);
|
||||
}
|
||||
/*end_assertion_handler_example*/
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_core_type_selector_example*/
|
||||
#define TBB_PREVIEW_TASK_ARENA_CORE_TYPE_SELECTOR 1
|
||||
|
||||
#include <oneapi/tbb/task_arena.h>
|
||||
#include <oneapi/tbb/info.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
int main() {
|
||||
tbb::task_arena::constraints c;
|
||||
c.set_core_type(tbb::task_arena::selectable);
|
||||
auto selector = [](std::tuple<tbb::core_type_id, std::size_t, std::size_t> core_type) -> int {
|
||||
auto index = std::get<1>(core_type);
|
||||
auto total = std::get<2>(core_type);
|
||||
// Exclude the least performant type when there is more than one;
|
||||
// rank the rest by index (higher index = higher score).
|
||||
return (total > 1 && index == 0) ? -1 : static_cast<int>(index);
|
||||
};
|
||||
|
||||
// Query the effective concurrency for these constraints and selector.
|
||||
int concurrency = tbb::info::default_concurrency(c, selector);
|
||||
std::printf("Effective concurrency: %d\n", concurrency);
|
||||
|
||||
// Create a task arena that uses the selected core types.
|
||||
tbb::task_arena arena(c, selector);
|
||||
|
||||
std::vector<double> data(1000);
|
||||
|
||||
arena.execute([&data] {
|
||||
tbb::parallel_for(std::size_t(0), data.size(),
|
||||
[&data](std::size_t i) {
|
||||
data[i] = static_cast<double>(i * i);
|
||||
});
|
||||
});
|
||||
|
||||
std::printf("data[999] = %.0f\n", data[999]);
|
||||
}
|
||||
/*end_core_type_selector_example*/
|
||||
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
/*begin_custom_mutex_chmap_example*/
|
||||
#define TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS 1
|
||||
#include "oneapi/tbb/concurrent_hash_map.h"
|
||||
#include <shared_mutex>
|
||||
|
||||
class SharedMutexWrapper {
|
||||
public:
|
||||
// ReaderWriterMutex requirements
|
||||
|
||||
static constexpr bool is_rw_mutex = true;
|
||||
static constexpr bool is_recursive_mutex = false;
|
||||
static constexpr bool is_fair_mutex = false;
|
||||
|
||||
class scoped_lock {
|
||||
public:
|
||||
scoped_lock() : my_mutex_ptr(nullptr), my_writer_flag(false) {}
|
||||
scoped_lock(SharedMutexWrapper& mutex, bool write = true)
|
||||
: my_mutex_ptr(&mutex), my_writer_flag(write)
|
||||
{
|
||||
if (my_writer_flag) {
|
||||
my_mutex_ptr->my_mutex.lock();
|
||||
} else {
|
||||
my_mutex_ptr->my_mutex.lock_shared();
|
||||
}
|
||||
}
|
||||
|
||||
~scoped_lock() {
|
||||
if (my_mutex_ptr) release();
|
||||
}
|
||||
|
||||
void acquire(SharedMutexWrapper& mutex, bool write = true) {
|
||||
if (my_mutex_ptr) release();
|
||||
|
||||
my_mutex_ptr = &mutex;
|
||||
my_writer_flag = write;
|
||||
|
||||
if (my_writer_flag) {
|
||||
my_mutex_ptr->my_mutex.lock();
|
||||
} else {
|
||||
my_mutex_ptr->my_mutex.lock_shared();
|
||||
}
|
||||
}
|
||||
|
||||
bool try_acquire(SharedMutexWrapper& mutex, bool write = true) {
|
||||
if (my_mutex_ptr) release();
|
||||
|
||||
my_mutex_ptr = &mutex;
|
||||
|
||||
bool result = false;
|
||||
|
||||
if (my_writer_flag) {
|
||||
result = my_mutex_ptr->my_mutex.try_lock();
|
||||
} else {
|
||||
result = my_mutex_ptr->my_mutex.try_lock_shared();
|
||||
}
|
||||
|
||||
if (result) my_writer_flag = write;
|
||||
return result;
|
||||
}
|
||||
|
||||
void release() {
|
||||
if (my_writer_flag) {
|
||||
my_mutex_ptr->my_mutex.unlock();
|
||||
} else {
|
||||
my_mutex_ptr->my_mutex.unlock_shared();
|
||||
}
|
||||
}
|
||||
|
||||
bool upgrade_to_writer() {
|
||||
// std::shared_mutex does not have the upgrade/downgrade semantics
|
||||
if (my_writer_flag) return true; // Already a writer
|
||||
|
||||
my_mutex_ptr->my_mutex.unlock_shared();
|
||||
my_mutex_ptr->my_mutex.lock();
|
||||
return false; // The lock was reacquired
|
||||
}
|
||||
|
||||
bool downgrade_to_reader() {
|
||||
if (!my_writer_flag) return true; // Already a reader
|
||||
|
||||
my_mutex_ptr->my_mutex.unlock();
|
||||
my_mutex_ptr->my_mutex.lock_shared();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_writer() const {
|
||||
return my_writer_flag;
|
||||
}
|
||||
|
||||
private:
|
||||
SharedMutexWrapper* my_mutex_ptr;
|
||||
bool my_writer_flag;
|
||||
};
|
||||
private:
|
||||
std::shared_mutex my_mutex;
|
||||
}; // struct SharedMutexWrapper
|
||||
|
||||
int main() {
|
||||
using map_type = oneapi::tbb::concurrent_hash_map<int, int,
|
||||
oneapi::tbb::tbb_hash_compare<int>,
|
||||
oneapi::tbb::tbb_allocator<std::pair<const int, int>>,
|
||||
SharedMutexWrapper>;
|
||||
|
||||
map_type map; // This object will use SharedMutexWrapper for thread safety of insert/find/erase operations
|
||||
}
|
||||
/*end_custom_mutex_chmap_example*/
|
||||
|
||||
#else // C++17
|
||||
// Skip
|
||||
int main() {}
|
||||
#endif
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
int parallel_loop1_begin = 0;
|
||||
int parallel_loop1_end = 100;
|
||||
|
||||
int parallel_loop2_begin = 100;
|
||||
int parallel_loop2_end = 1000;
|
||||
|
||||
struct parallel_loop_body {
|
||||
void operator()(int) const {}
|
||||
};
|
||||
|
||||
using parallel_loop1_body = parallel_loop_body;
|
||||
using parallel_loop2_body = parallel_loop_body;
|
||||
|
||||
/*begin_feature_test_macros_example*/
|
||||
|
||||
#define TBB_PREVIEW_PARALLEL_PHASE 1
|
||||
|
||||
#include <oneapi/tbb/version.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
|
||||
#if TBB_HAS_PARALLEL_PHASE
|
||||
#include <oneapi/tbb/task_arena.h>
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
#if TBB_HAS_PARALLEL_PHASE
|
||||
tbb::this_task_arena::start_parallel_phase();
|
||||
#endif
|
||||
|
||||
tbb::parallel_for(parallel_loop1_begin, parallel_loop1_end,
|
||||
parallel_loop1_body{});
|
||||
|
||||
tbb::parallel_for(parallel_loop2_begin, parallel_loop2_end,
|
||||
parallel_loop2_body{});
|
||||
|
||||
#if TBB_HAS_PARALLEL_PHASE
|
||||
tbb::this_task_arena::end_parallel_phase(tbb::task_arena::parallel_phase::end_flag_fast_leave{});
|
||||
#endif
|
||||
}
|
||||
|
||||
/*end_feature_test_macros_example*/
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <initializer_list>
|
||||
|
||||
struct DB_handle {
|
||||
void read() {}
|
||||
void write() {}
|
||||
};
|
||||
|
||||
DB_handle* open_database() {
|
||||
static DB_handle global_db_handle;
|
||||
return &global_db_handle;
|
||||
}
|
||||
|
||||
struct processor_body {
|
||||
int operator()(int id) const { return id; }
|
||||
};
|
||||
|
||||
auto input_ids = {1, 2, 3};
|
||||
|
||||
/*begin_fg_resource_limiting_example*/
|
||||
#define TBB_PREVIEW_FLOW_GRAPH_RESOURCE_LIMITING 1
|
||||
#include <oneapi/tbb/flow_graph.h>
|
||||
|
||||
int main() {
|
||||
using namespace tbb::flow;
|
||||
|
||||
resource_limiter<DB_handle*> db_limiter{open_database()};
|
||||
|
||||
graph g;
|
||||
|
||||
using resource_limited_node_type = resource_limited_node<int, std::tuple<int>>;
|
||||
|
||||
// Concurrency is unlimited, but db_limiter ensures exclusive DB access
|
||||
resource_limited_node_type db_reader(g, unlimited,
|
||||
std::tie(db_limiter),
|
||||
[](int id, auto& ports, DB_handle* db) {
|
||||
db->read();
|
||||
// other actions with the data read from db
|
||||
std::get<0>(ports).try_put(id);
|
||||
});
|
||||
|
||||
function_node<int, int> processor(g, unlimited, processor_body{});
|
||||
|
||||
resource_limited_node_type db_writer(g, unlimited,
|
||||
std::tie(db_limiter),
|
||||
[](int id, auto& ports, DB_handle* db) {
|
||||
// other actions with the database
|
||||
db->write();
|
||||
std::get<0>(ports).try_put(id);
|
||||
}
|
||||
);
|
||||
|
||||
make_edge(output_port<0>(db_reader), processor);
|
||||
make_edge(processor, db_writer);
|
||||
// Other graph nodes and edges
|
||||
|
||||
for (int id : input_ids) {
|
||||
db_reader.try_put(id);
|
||||
}
|
||||
|
||||
g.wait_for_all();
|
||||
}
|
||||
/*end_fg_resource_limiting_example*/
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_fixed_pool_example*/
|
||||
#define TBB_PREVIEW_MEMORY_POOL 1
|
||||
#include "oneapi/tbb/memory_pool.h"
|
||||
|
||||
int main() {
|
||||
char buf[1024];
|
||||
oneapi::tbb::fixed_pool my_pool(buf, 1024);
|
||||
|
||||
void* my_ptr = my_pool.malloc(10);
|
||||
my_pool.free(my_ptr);
|
||||
}
|
||||
/*end_fixed_pool_example*/
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
/*begin_helpers_for_expressing_graphs_preview_api_example*/
|
||||
#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1
|
||||
#include <oneapi/tbb/flow_graph.h>
|
||||
|
||||
int main() {
|
||||
using namespace oneapi::tbb::flow;
|
||||
|
||||
graph g;
|
||||
|
||||
function_node doubler(g, unlimited, [](const int& v) { return 2 * v; });
|
||||
function_node squarer(g, unlimited, [](const int& v) { return v * v; });
|
||||
function_node cuber(g, unlimited, [](const int& v) { return v * v * v; });
|
||||
|
||||
auto handlers = make_node_set(doubler, squarer, cuber);
|
||||
|
||||
broadcast_node input(precedes(handlers));
|
||||
join_node join(follows(handlers));
|
||||
|
||||
int sum = 0;
|
||||
function_node summer(follows(join), serial,
|
||||
[&](const std::tuple<int, int, int>& v) {
|
||||
int sub_sum = std::get<0>(v) + std::get<1>(v) + std::get<2>(v);
|
||||
sum += sub_sum;
|
||||
return sub_sum;
|
||||
});
|
||||
|
||||
for (int i = 1; i <= 10; ++i) {
|
||||
input.try_put(i);
|
||||
}
|
||||
g.wait_for_all();
|
||||
}
|
||||
/*end_helpers_for_expressing_graphs_preview_api_example*/
|
||||
#else
|
||||
// Skip
|
||||
int main() {}
|
||||
#endif
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
/*begin_helpers_for_expressing_graphs_regular_api_example*/
|
||||
#include <oneapi/tbb/flow_graph.h>
|
||||
|
||||
int main() {
|
||||
using namespace oneapi::tbb::flow;
|
||||
|
||||
graph g;
|
||||
|
||||
broadcast_node<int> input(g);
|
||||
|
||||
function_node doubler(g, unlimited, [](const int& v) { return 2 * v; });
|
||||
function_node squarer(g, unlimited, [](const int& v) { return v * v; });
|
||||
function_node cuber(g, unlimited, [](const int& v) { return v * v * v; });
|
||||
|
||||
join_node<std::tuple<int, int, int>> join(g);
|
||||
|
||||
int sum = 0;
|
||||
function_node summer(g, serial, [&](const std::tuple<int, int, int>& v) {
|
||||
int sub_sum = std::get<0>(v) + std::get<1>(v) + std::get<2>(v);
|
||||
sum += sub_sum;
|
||||
return sub_sum;
|
||||
});
|
||||
|
||||
make_edge(input, doubler);
|
||||
make_edge(input, squarer);
|
||||
make_edge(input, cuber);
|
||||
make_edge(doubler, std::get<0>(join.input_ports()));
|
||||
make_edge(squarer, std::get<1>(join.input_ports()));
|
||||
make_edge(cuber, std::get<2>(join.input_ports()));
|
||||
make_edge(join, summer);
|
||||
|
||||
for (int i = 1; i <= 10; ++i) {
|
||||
input.try_put(i);
|
||||
}
|
||||
g.wait_for_all();
|
||||
}
|
||||
/*end_helpers_for_expressing_graphs_regular_api_example*/
|
||||
|
||||
#else
|
||||
// Skip
|
||||
int main() {}
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#if __cplusplus >= 201703L
|
||||
|
||||
/*begin_make_edges_function_example*/
|
||||
#define TBB_PREVIEW_FLOW_GRAPH_FEATURES 1
|
||||
#include <oneapi/tbb/flow_graph.h>
|
||||
|
||||
int main() {
|
||||
using namespace oneapi::tbb::flow;
|
||||
|
||||
graph g;
|
||||
broadcast_node<int> input(g);
|
||||
|
||||
function_node doubler(g, unlimited, [](const int& i) { return 2 * i; });
|
||||
function_node squarer(g, unlimited, [](const int& i) { return i * i; });
|
||||
function_node cuber(g, unlimited, [](const int& i) { return i * i * i; });
|
||||
|
||||
buffer_node<int> buffer(g);
|
||||
|
||||
auto handlers = make_node_set(doubler, squarer, cuber);
|
||||
make_edges(input, handlers);
|
||||
make_edges(handlers, buffer);
|
||||
|
||||
for (int i = 1; i <= 10; ++i) {
|
||||
input.try_put(i);
|
||||
}
|
||||
g.wait_for_all();
|
||||
}
|
||||
/*end_make_edges_function_example*/
|
||||
|
||||
#else
|
||||
// Skip
|
||||
int main() {}
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#if _WIN32
|
||||
|
||||
/*begin_malloc_replacement_log_example*/
|
||||
#include "oneapi/tbb/tbbmalloc_proxy.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main(){
|
||||
char **func_replacement_log;
|
||||
int func_replacement_status = TBB_malloc_replacement_log(&func_replacement_log);
|
||||
|
||||
if (func_replacement_status != 0) {
|
||||
printf("tbbmalloc_proxy cannot replace memory allocation routines\n");
|
||||
for (char** log_string = func_replacement_log; *log_string != 0; log_string++) {
|
||||
printf("%s\n",*log_string);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*end_malloc_replacement_log_example*/
|
||||
|
||||
#else
|
||||
// Skip
|
||||
int main() {}
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_memory_pool_allocator_example*/
|
||||
#define TBB_PREVIEW_MEMORY_POOL 1
|
||||
#include "oneapi/tbb/memory_pool.h"
|
||||
#include <list>
|
||||
|
||||
int main() {
|
||||
oneapi::tbb::memory_pool<std::allocator<int>> my_pool;
|
||||
|
||||
typedef oneapi::tbb::memory_pool_allocator<int> pool_allocator_t;
|
||||
std::list<int, pool_allocator_t> my_list(pool_allocator_t{my_pool});
|
||||
|
||||
my_list.emplace_back(1);
|
||||
}
|
||||
/*end_memory_pool_allocator_example*/
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_memory_pool_example*/
|
||||
#define TBB_PREVIEW_MEMORY_POOL 1
|
||||
#include "oneapi/tbb/memory_pool.h"
|
||||
|
||||
int main() {
|
||||
oneapi::tbb::memory_pool<std::allocator<char>> my_pool;
|
||||
|
||||
void* my_ptr = my_pool.malloc(10);
|
||||
my_pool.free(my_ptr);
|
||||
}
|
||||
/*end_memory_pool_example*/
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/*begin_parallel_phase_example*/
|
||||
#define TBB_PREVIEW_PARALLEL_PHASE 1
|
||||
|
||||
#include "oneapi/tbb/global_control.h"
|
||||
#include "oneapi/tbb/task_arena.h"
|
||||
#include "oneapi/tbb/parallel_for.h"
|
||||
#include "oneapi/tbb/parallel_sort.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
int main() {
|
||||
oneapi::tbb::global_control gc(
|
||||
oneapi::tbb::global_control::leave_policy,
|
||||
oneapi::tbb::task_arena::leave_policy::fast
|
||||
);
|
||||
|
||||
oneapi::tbb::task_arena ta;
|
||||
|
||||
std::vector<int> data(1000);
|
||||
|
||||
{
|
||||
oneapi::tbb::task_arena::parallel_phase phase{ta};
|
||||
ta.execute([&data]() {
|
||||
oneapi::tbb::parallel_for(std::size_t(0), data.size(), [&data](std::size_t i) {
|
||||
data[i] = static_cast<int>(i*i);
|
||||
});
|
||||
});
|
||||
|
||||
for (std::size_t i = 1; i < data.size(); ++i) {
|
||||
data[i] += data[i-1];
|
||||
}
|
||||
|
||||
ta.execute([&data]() {
|
||||
oneapi::tbb::parallel_sort(data.begin(), data.end());
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
/*end_parallel_phase_example*/
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
Copyright (c) 2025 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
static constexpr std::size_t serial_threshold = 16;
|
||||
|
||||
/*begin_task_group_extensions_bypassing_example*/
|
||||
#define TBB_PREVIEW_TASK_GROUP_EXTENSIONS 1
|
||||
#include "oneapi/tbb/task_group.h"
|
||||
|
||||
template <typename Iterator, typename Function>
|
||||
struct for_task {
|
||||
tbb::task_handle operator()() const {
|
||||
tbb::task_handle next_task;
|
||||
|
||||
auto size = end - begin;
|
||||
if (size < serial_threshold) {
|
||||
// Execute the work serially
|
||||
for (Iterator it = begin; it != end; ++it) {
|
||||
f(*it);
|
||||
}
|
||||
} else {
|
||||
// Enough work to split the range
|
||||
Iterator middle = begin + size / 2;
|
||||
|
||||
// Submit the right subtask for execution
|
||||
tg.run(for_task<Iterator, Function>{middle, end, f, tg});
|
||||
|
||||
// Bypass the left subtask
|
||||
next_task = tg.defer(for_task<Iterator, Function>{begin, middle, f, tg});
|
||||
}
|
||||
return next_task;
|
||||
}
|
||||
|
||||
Iterator begin;
|
||||
Iterator end;
|
||||
Function f;
|
||||
tbb::task_group& tg;
|
||||
}; // struct for_task
|
||||
|
||||
template <typename RandomAccessIterator, typename Function>
|
||||
void par_for_each(RandomAccessIterator begin, RandomAccessIterator end, Function f) {
|
||||
tbb::task_group tg;
|
||||
// Run the root task
|
||||
tg.run_and_wait(for_task<RandomAccessIterator, Function>{begin, end, std::move(f), tg});
|
||||
}
|
||||
/*end_task_group_extensions_bypassing_example*/
|
||||
|
||||
int main() {
|
||||
constexpr std::size_t N = 1000;
|
||||
|
||||
std::size_t array[N];
|
||||
|
||||
par_for_each(array, array + N, [](std::size_t& item) {
|
||||
item = 42;
|
||||
});
|
||||
|
||||
for (std::size_t i = 0; i < N; ++i) {
|
||||
if (array[i] != 42) {
|
||||
std::cerr << "Error in " << i << "index" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
Copyright (c) 2025 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
static constexpr std::size_t serial_threshold = 16;
|
||||
|
||||
/*begin_task_group_extensions_reduction_example*/
|
||||
#define TBB_PREVIEW_TASK_GROUP_EXTENSIONS 1
|
||||
#include "oneapi/tbb/task_group.h"
|
||||
|
||||
struct reduce_task {
|
||||
|
||||
struct join_task {
|
||||
void operator()() const {
|
||||
result = *left + *right;
|
||||
}
|
||||
|
||||
std::size_t& result;
|
||||
std::unique_ptr<std::size_t> left;
|
||||
std::unique_ptr<std::size_t> right;
|
||||
};
|
||||
|
||||
tbb::task_handle operator()() const {
|
||||
tbb::task_handle next_task;
|
||||
|
||||
std::size_t size = end - begin;
|
||||
if (size < serial_threshold) {
|
||||
// Perform serial reduction
|
||||
for (std::size_t i = begin; i < end; ++i) {
|
||||
result += i;
|
||||
}
|
||||
} else {
|
||||
// The range is too large to process directly
|
||||
// Divide it into smaller segments for parallel execution
|
||||
std::size_t middle = begin + size / 2;
|
||||
|
||||
auto left_result = std::make_unique<std::size_t>(0);
|
||||
auto right_result = std::make_unique<std::size_t>(0);
|
||||
|
||||
|
||||
tbb::task_handle left_leaf = tg.defer(reduce_task{begin, middle, *left_result, tg});
|
||||
tbb::task_handle right_leaf = tg.defer(reduce_task{middle, end, *right_result, tg});
|
||||
|
||||
tbb::task_handle join = tg.defer(join_task{result, std::move(left_result), std::move(right_result)});
|
||||
|
||||
tbb::task_group::set_task_order(left_leaf, join);
|
||||
tbb::task_group::set_task_order(right_leaf, join);
|
||||
|
||||
tbb::task_group::transfer_this_task_completion_to(join);
|
||||
|
||||
// Save the left leaf for further bypassing
|
||||
next_task = std::move(left_leaf);
|
||||
|
||||
tg.run(std::move(right_leaf));
|
||||
tg.run(std::move(join));
|
||||
}
|
||||
|
||||
return next_task;
|
||||
}
|
||||
|
||||
std::size_t begin;
|
||||
std::size_t end;
|
||||
std::size_t& result;
|
||||
tbb::task_group& tg;
|
||||
};
|
||||
|
||||
std::size_t calculate_parallel_sum(std::size_t begin, std::size_t end) {
|
||||
tbb::task_group tg;
|
||||
|
||||
std::size_t reduce_result = 0;
|
||||
tg.run_and_wait(reduce_task{begin, end, reduce_result, tg});
|
||||
|
||||
return reduce_result;
|
||||
}
|
||||
/*end_task_group_extensions_reduction_example*/
|
||||
|
||||
int main() {
|
||||
constexpr std::size_t N = 10000;
|
||||
std::size_t serial_sum = N * (N - 1) / 2;
|
||||
std::size_t parallel_sum = calculate_parallel_sum(0, N);
|
||||
|
||||
if (serial_sum != parallel_sum) std::cerr << "Incorrect reduction result" << std::endl;
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
Copyright (c) 2026 UXL Foundation Contributors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
class Cache {
|
||||
public:
|
||||
Cache() = default;
|
||||
|
||||
bool lookup(int key, int& result) const {
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
auto it = m_key_result_map.find(key);
|
||||
if (it == m_key_result_map.end()) {
|
||||
return false;
|
||||
} else {
|
||||
result = it->second;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void add(int key, int result) {
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
m_key_result_map.emplace(key, result);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
std::unique_lock<std::mutex> lock(m_mutex);
|
||||
m_key_result_map.clear();
|
||||
}
|
||||
private:
|
||||
std::unordered_map<int, int> m_key_result_map;
|
||||
mutable std::mutex m_mutex;
|
||||
};
|
||||
|
||||
Cache global_cache;
|
||||
|
||||
bool cache_lookup(int key, int& result) {
|
||||
return global_cache.lookup(key, result);
|
||||
}
|
||||
|
||||
void add_to_cache(int key, int result) {
|
||||
global_cache.add(key, result);
|
||||
}
|
||||
|
||||
void clear_cache() {
|
||||
global_cache.clear();
|
||||
}
|
||||
|
||||
struct calculate_result {
|
||||
int input;
|
||||
int& result;
|
||||
|
||||
calculate_result(int i, int& r)
|
||||
: input(i), result(r) {}
|
||||
|
||||
void operator()() const {
|
||||
result = input * input;
|
||||
}
|
||||
};
|
||||
|
||||
struct cache_result {
|
||||
int input;
|
||||
int result;
|
||||
|
||||
cache_result(int i, int r)
|
||||
: input(i), result(r) {}
|
||||
|
||||
void operator()() const {
|
||||
add_to_cache(input, result);
|
||||
}
|
||||
};
|
||||
|
||||
/*begin_task_group_extensions_wait_for_one_example*/
|
||||
#define TBB_PREVIEW_TASK_GROUP_EXTENSIONS 1
|
||||
#include <oneapi/tbb/task_group.h>
|
||||
|
||||
int calculate_one_result(tbb::task_group& tg, int input) {
|
||||
int result = 0;
|
||||
|
||||
// Check cache first
|
||||
if (cache_lookup(input, result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// No cached item - run result calculation
|
||||
// May build task graph with dependencies
|
||||
tbb::task_handle calculate_task = tg.defer(calculate_result(input, result));
|
||||
tg.run_and_wait_for_task(std::move(calculate_task));
|
||||
|
||||
// Result is calculated - run asynchronous caching
|
||||
tg.run(cache_result(input, result));
|
||||
|
||||
// Return the result to caller
|
||||
return result;
|
||||
}
|
||||
|
||||
void calculate_all_results(const std::vector<int>& inputs, std::vector<int>& results) {
|
||||
tbb::task_group tg;
|
||||
|
||||
for (std::size_t i = 0; i < inputs.size(); ++i) {
|
||||
results[i] = calculate_one_result(tg, inputs[i]);
|
||||
}
|
||||
|
||||
// Wait for all incomplete caching tasks before clear
|
||||
tg.wait();
|
||||
clear_cache();
|
||||
}
|
||||
|
||||
/*end_task_group_extensions_wait_for_one_example*/
|
||||
|
||||
int main() {
|
||||
std::vector<int> inputs = {1, 2, 3, 4, 5};
|
||||
std::vector<int> results = {0, 0, 0, 0, 0};
|
||||
|
||||
calculate_all_results(inputs, results);
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
Copyright (c) 2025 Intel Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include <tuple>
|
||||
|
||||
// dummy bodies
|
||||
struct f1_body {
|
||||
int operator()(int input) { return input; };
|
||||
};
|
||||
|
||||
struct f2_body : f1_body {};
|
||||
struct f3_body : f1_body {};
|
||||
|
||||
struct f4_body {
|
||||
int operator()(const std::tuple<int, int>& input) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
/*begin_try_put_and_wait_example*/
|
||||
#define TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT 1
|
||||
#include <oneapi/tbb/flow_graph.h>
|
||||
#include <oneapi/tbb/parallel_for.h>
|
||||
#include <tuple>
|
||||
|
||||
struct f1_body;
|
||||
struct f2_body;
|
||||
struct f3_body;
|
||||
struct f4_body;
|
||||
|
||||
int main() {
|
||||
using namespace oneapi::tbb;
|
||||
|
||||
flow::graph g;
|
||||
flow::broadcast_node<int> start_node(g);
|
||||
|
||||
flow::function_node<int, int> f1(g, flow::unlimited, f1_body{});
|
||||
flow::function_node<int, int> f2(g, flow::unlimited, f2_body{});
|
||||
flow::function_node<int, int> f3(g, flow::unlimited, f3_body{});
|
||||
|
||||
flow::join_node<std::tuple<int, int>> join(g);
|
||||
|
||||
flow::function_node<std::tuple<int, int>, int> f4(g, flow::serial, f4_body{});
|
||||
|
||||
flow::make_edge(start_node, f1);
|
||||
flow::make_edge(f1, f2);
|
||||
|
||||
flow::make_edge(start_node, f3);
|
||||
|
||||
flow::make_edge(f2, flow::input_port<0>(join));
|
||||
flow::make_edge(f3, flow::input_port<1>(join));
|
||||
|
||||
flow::make_edge(join, f4);
|
||||
|
||||
// Submit work into the graph
|
||||
parallel_for(0, 100, [&](int input) {
|
||||
start_node.try_put_and_wait(input);
|
||||
|
||||
// Post processing the result of input
|
||||
});
|
||||
}
|
||||
/*end_try_put_and_wait_example*/
|
||||
@@ -0,0 +1,88 @@
|
||||
.. _feature_test_macros:
|
||||
|
||||
Feature-test Macros
|
||||
===================
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
Description
|
||||
***********
|
||||
|
||||
|short_name| defines a set of preprocessor macros corresponding to the features
|
||||
provided by the library. They are intended for detecting the presence of these features.
|
||||
|
||||
Each of these macros is defined in the header ``<oneapi/tbb/version.h>`` and in the feature headers
|
||||
specified in the table below.
|
||||
|
||||
For preview features, the feature test macro is only defined if the feature is enabled by defining its
|
||||
preview macro. You cannot use a feature test macro to guard setting of the feature preview macro.
|
||||
For example:
|
||||
|
||||
.. code:: cpp
|
||||
|
||||
// Wrong
|
||||
#include <oneapi/tbb/version.h>
|
||||
#if TBB_HAS_FEATURE_X
|
||||
#define TBB_PREVIEW_FEATURE_X 1 // Never reached
|
||||
#include <oneapi/tbb/feature_header.h>
|
||||
#endif
|
||||
// Correct
|
||||
#define TBB_PREVIEW_FEATURE_X 1
|
||||
#include <oneapi/tbb/version.h>
|
||||
#if TBB_HAS_FEATURE_X
|
||||
#include <oneapi/tbb/feature_header.h>
|
||||
#endif
|
||||
|
||||
Each macro value follows the pattern ``YYYYMM``, where ``YYYY`` is a year, and ``MM`` is a month when
|
||||
the corresponding feature was introduced or updated. These values can be increased if the capabilities of given features
|
||||
are extended. The table below contains only the most recent values.
|
||||
|
||||
.. container:: tablenoborder
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Feature
|
||||
- Macro Name
|
||||
- Value
|
||||
- Header(s)
|
||||
* - :ref:`Resource Limiting in the Flow Graph<fg_resource_limiting>`
|
||||
- ``TBB_HAS_FLOW_GRAPH_RESOURCE_LIMITING``
|
||||
- ``202608``
|
||||
- ``<oneapi/tbb/flow_graph.h>``
|
||||
* - :ref:`parallel_phase Interface for Task Arena<parallel_phase_for_task_arena>`
|
||||
- ``TBB_HAS_PARALLEL_PHASE``
|
||||
- ``202603``
|
||||
- ``<oneapi/tbb/task_arena.h>``
|
||||
* - :ref:`Core Type Selector for Task Arena Constraints<core_type_selector>`
|
||||
- ``TBB_HAS_TASK_ARENA_CORE_TYPE_SELECTOR``
|
||||
- ``202603``
|
||||
- | ``<oneapi/tbb/task_arena.h>``
|
||||
| ``<oneapi/tbb/info.h>``
|
||||
* - :ref:`task_group Dynamic Dependencies<dynamic_dependencies>`
|
||||
- ``TBB_HAS_TASK_GROUP_DEPENDENCIES``
|
||||
- ``202603``
|
||||
- | ``<oneapi/tbb/task_group.h>``
|
||||
| ``<oneapi/tbb/task_arena.h>``
|
||||
* - :ref:`Waiting for Individual Tasks in task_group<wait_single_task>`
|
||||
- ``TBB_HAS_TASK_GROUP_WAIT_FOR_SINGLE_TASK``
|
||||
- ``202603``
|
||||
- | ``<oneapi/tbb/task_group.h>``
|
||||
| ``<oneapi/tbb/task_arena.h>``
|
||||
* - :ref:`Allocate Memory Interleaved between NUMA Nodes<numa_interleaved_allocation>`
|
||||
- ``TBB_HAS_NUMA_ALLOCATION``
|
||||
- ``202605``
|
||||
- | ``<oneapi/tbb/numa_allocation.h>``
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
The following example uses a feature-test macro to conditionally enable ``parallel_phase``
|
||||
hints when supported by the library:
|
||||
|
||||
.. literalinclude:: ./examples/feature_test_macros.cpp
|
||||
:language: c++
|
||||
:start-after: /*begin_feature_test_macros_example*/
|
||||
:end-before: /*end_feature_test_macros_example*/
|
||||
@@ -0,0 +1,55 @@
|
||||
.. _fg_resource_limiting:
|
||||
|
||||
Resource Limiting in the Flow Graph
|
||||
===================================
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. note::
|
||||
To enable this feature, set the ``TBB_PREVIEW_FLOW_GRAPH_RESOURCE_LIMITING``
|
||||
or ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to ``1``.
|
||||
|
||||
Description
|
||||
***********
|
||||
|
||||
The Resource Limiting feature enables Flow Graph nodes to safely coordinate access to shared external
|
||||
resources such as database connections, thread-unsafe libraries, etc.
|
||||
|
||||
The feature consists of two components:
|
||||
|
||||
* ``flow::resource_limiter`` class - a *provider* that manages a set of resources.
|
||||
* ``flow::resource_limited_node`` class - a *consumer* node whose body is invoked only after the node
|
||||
acquires access to a resource from each associated ``resource_limiter``.
|
||||
|
||||
A node that must hold resources from several limiters at once can make little progress if the limiters keep
|
||||
granting access to nodes that need only one resource. To avoid such starvation, a ``resource_limiter``
|
||||
arbitrates between competing consumers on a best-effort priority basis, preferring the consumer whose request
|
||||
was made earlier, rather than granting access in an unspecified order. A request that cannot be satisfied
|
||||
retains its position, so a consumer waiting for several resources becomes preferred over later requests as it
|
||||
waits.
|
||||
|
||||
API
|
||||
***
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
|
||||
fg_resource_limiting/resource_limited_node_body_named_requirement.rst
|
||||
fg_resource_limiting/resource_limiter_cls.rst
|
||||
fg_resource_limiting/resource_limited_node_cls.rst
|
||||
|
||||
Example
|
||||
*******
|
||||
|
||||
In the example below, two nodes share an exclusive database connection through
|
||||
a ``resource_limiter`` managing a single handle:
|
||||
|
||||
.. literalinclude:: ./examples/fg_resource_limiting.cpp
|
||||
:language: c++
|
||||
:start-after: /*begin_fg_resource_limiting_example*/
|
||||
:end-before: /*end_fg_resource_limiting_example*/
|
||||
|
||||
Because ``db_limiter`` holds only one resource handle, the bodies of ``db_reader`` and ``db_writer``
|
||||
are never invoked at the same time - even though both nodes allow ``unlimited`` concurrency.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user