Compare commits

...
1154 Commits
Author SHA1 Message Date
Konstantin Boyarinov 8301257efd Fix polymorphic memory resource feature detection on libc++ + add conditional export in the module (#2188) 2026-09-09 12:40:59 +02:00
Sergei Aleksandrovich 583ff86379 Fix lost wakeup in mutex/rw_mutex on AArch64 (#2136) 2026-09-09 11:06:24 +02:00
Alexandr-KonovalovandCopilot Autofix powered by AI b021a68cc9 Test syscall failures during interleaved memory allocation (#2182)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-07 12:29:29 +02:00
Olga Malysheva e00c68dcac [TCM] Use correct path for .lib files in vars.bat (#2183) 2026-09-04 10:39:53 +02:00
843162db8c Description of static linking (#2161)
Co-authored-by: Olga Malysheva <olga.malysheva@intel.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-09-02 09:07:50 -05:00
Ilya IsaevandKonstantin Boyarinov 4167f80a63 Set core_type and max_threads_per_core only for supported arenas (#2181)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2026-09-02 14:46:33 +02:00
dependabot[bot] ba51d1c178 Bump step-security/harden-runner from 2.20.0 to 2.21.0 (#2178)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 14:31:52 +02:00
dependabot[bot] 562f45baa5 Bump actions/labeler from 6.1.0 to 7.0.0 (#2177)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 13:25:43 +02:00
dependabot[bot] 09da692d7e Bump ossf/scorecard-action from 2.4.3 to 2.4.4 (#2176)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 13:24:42 +02:00
Ilya IsaevandAleksei Fedotov b03a694ee0 [TCM] Add def files for TCM (#2180)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <fedotov.aleksei@gmail.com>
2026-09-01 17:31:02 +02:00
Konstantin Boyarinov a8216b9520 Move custom assertion handler to TBB namespace (#2167) 2026-08-28 11:50:42 +02:00
Ilya Isaev a88990d057 Save settings from r1::arena to task_arena during attach (#2160)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-08-28 11:05:57 +02:00
Konstantin Boyarinov a8d9731c90 Improve performance of parallel_sort algorithm (#2132) 2026-08-27 16:37:52 +02:00
Ilya IsaevandAlexey Kukanov 00eb0fe3a7 Reapply "Rework get_task and steal_task" patch (#2169)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2026-08-27 15:45:31 +02:00
Ilya Isaev 358d8e04e7 Use try-lock approach on stealing path (#2158)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-08-27 12:44:30 +02:00
Dmitri Mokhov 03bfb4eb11 Simplify constrained nested arena test (#2165) 2026-08-26 10:50:13 -05:00
Ilya Isaev 88fbc345cb Reduce number of iterations for TestCleanupMaster under sanitizers (#2168) 2026-08-26 12:20:08 +02:00
Ilya Isaev cef64f65e8 [TCM] Fix path in TCM installation (#2166)
Fix incorrectly changed path in install CMake scripts
2026-08-25 16:22:20 +02:00
Olga Malysheva e349c15263 Update oneTBB version to 2023.2.0 (#2153) 2026-08-19 17:24:20 +02:00
Mike VossandCopilot Autofix powered by AI 3cdc6f6558 Add starvation avoidance based on priorities (#2150)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-13 13:21:31 -05:00
fe43e53039 Move leave_policy/parallel_phase functionality out of preview (#2157)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-08-13 19:04:24 +02:00
321475449d Update leave_policy/parallel phase-related RFCs (#2130)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-08-13 12:19:38 +02:00
e5b7756973 Introduce new constructors for flow::resource_limiter (#2137)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-08-13 11:28:55 +02:00
Alexandr-Konovalov dea347d9b5 Explicitely prohibit resuming after calling of assertion_handler (#2147) 2026-08-11 11:56:55 +02:00
dependabot[bot] f09e1fef1e Bump github/codeql-action/autobuild from 4.36.0 to 4.37.3 (#2146)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 11:48:07 +02:00
dependabot[bot] 7044849c44 Bump actions/checkout from 6.0.2 to 7.0.1 (#2145)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 11:47:43 +02:00
dependabot[bot] 8f7db26f42 Bump github/codeql-action/analyze from 4.36.0 to 4.37.3 (#2144)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 11:47:24 +02:00
dependabot[bot] b5b83e6e20 Bump step-security/harden-runner from 2.19.4 to 2.20.0 (#2143)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 11:47:06 +02:00
dependabot[bot] 1bd6950cdc Bump github/codeql-action/init from 4.36.0 to 4.37.3 (#2142)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-11 11:46:35 +02:00
Olga Malysheva 171e5ead91 [TCM] Update version to 1.6.0 (#2154) 2026-08-10 11:39:17 +02:00
Aleksei Fedotov fe9bfc5870 [TCM] Add possibility to build TCM using oneTBB's CMake (#2110) 2026-08-04 17:33:47 +02:00
NsPro04 d9d0c41aac Fix no member named 'hardware_destructive_interference_size' (#2149)
In "cache_aligned_allocator.h", include <new> to define std::hardware_destructive_interference_size
2026-08-04 09:01:51 +02:00
Alexandr-Konovalov 2fea40755c Extend comments in test_utils.cpp (#2141) 2026-07-31 15:32:58 +02:00
Aleksei Fedotov a736b40f52 [TCM] Add common paths to generated envars scripts (#2134) 2026-07-24 17:02:23 +02:00
Konstantin Boyarinov 75470994e8 Make task_arena constants constexpr (#2120) 2026-07-24 10:20:55 +02:00
Mike VossandAleksei Fedotov 7dcc00cebe Fix to avoid exceeding concurrency in resource_limited_node (#2103)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-07-23 10:23:18 -05:00
Aleksei Fedotov 1bf3c3a6a3 [TCM] Correct renegotiating for two requests w/o hyperthreading (#2129) 2026-07-22 17:07:49 +02:00
Ilya IsaevandMike Voss 82bfdfe3a7 Move C++20 modules RFC to experimental (#2122)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-07-15 12:27:25 +02:00
Aleksei Fedotov 656f1f26e9 [TCM] Disable test threads sleep for small number of CPUs (#2126) 2026-07-14 17:48:55 +02:00
Dmitri Mokhov fc47943ae6 Fix slot index handling for constrained nested arenas (#2121) 2026-07-13 10:02:23 -05:00
Olga Malysheva 0e2d2c0bb9 Address comments from the original PR #2123 (#2124) 2026-07-10 15:21:06 +02:00
Olga Malysheva b2e6335a2d Update Release Notes and System Requirements for oneTBB 2023.1 release (#2123) 2026-07-10 14:22:24 +02:00
Aleksei Fedotov d2addf4f7b [CI] Update Windows job windows-2025 (#2113) 2026-06-30 14:14:15 +02:00
Aleksei Fedotov 65cd296b51 [DOCTEST] Suppress MSVC warning about incorrect std::tuple specialization (#2114) 2026-06-30 10:55:03 +02:00
Aleksei Fedotov bce61b2c1a [CI] Add checks for exit codes of executed commands (#2112) 2026-06-30 10:42:53 +02:00
Aleksei Fedotov f48775ba44 [TCM] Move TCM internals to implementation side (#2111) 2026-06-24 15:53:31 +02:00
Alexandr-Konovalov 628c90df68 Mention is the docs, that interleaving is not mandatory (#2109) 2026-06-22 10:21:46 +02:00
285bb670a3 Support interleaved allocations of objects > 2MB with non-default bytes_per_chunk (#2107)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-06-22 10:20:35 +02:00
Dmitri Mokhov 10f8b53684 Update the spec to clarify which parameters are overridden by task_arena::initialize (#2104) 2026-06-17 15:02:10 -05:00
Konstantin Boyarinov b9a0766bfd Fix sporadic hangs in FG buffering node tests (#2102) 2026-06-16 12:45:05 +02:00
0f4a5b1b67 Add documentation about C++20 modules support (#2105)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-06-15 20:53:38 +02:00
Alexandr-Konovalov 43b4edece2 Allocate memory directly from NUMA nodes to support interleaving (#2087) 2026-06-10 18:25:24 +02:00
51c79a6b89 Add documentation for interleaved memory allocation (#2088)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2026-06-09 18:29:44 +02:00
Philipp Remy 265b28bed6 Fix universal builds on Apple with LLVM Clang (#2094)
Signed-off-by: Philipp Remy <philipp@philippremy.net>
2026-06-09 14:20:41 +02:00
Alexandr-Konovalov ca41ba283c Explicitly tests alignment utility functions (#2100) 2026-06-08 16:09:08 +02:00
dependabot[bot] 3436ab3944 Bump actions/labeler from 6.0.1 to 6.1.0 (#2096)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-02 11:27:06 +02:00
dependabot[bot] 5f3fb4ea38 Bump step-security/harden-runner from 2.19.0 to 2.19.4 (#2097)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-02 11:26:30 +02:00
dependabot[bot] caf48d533d Bump github/codeql-action from 4.35.2 to 4.36.0 (#2095)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-02 11:25:56 +02:00
dependabot[bot] e9af1a1b38 Bump step-security/harden-runner from 2.16.1 to 2.19.0 (#2069)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 17:40:16 +02:00
dependabot[bot] 45291f4f66 Bump actions/upload-artifact from 7.0.0 to 7.0.1 (#2070)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 17:39:31 +02:00
dependabot[bot] 2319e77c31 Bump github/codeql-action from 4.35.1 to 4.35.2 (#2071)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-29 17:38:54 +02:00
Alexandr-Konovalov 269d340d0d The library uses libnuma.so.1, test also should use it (#2093) 2026-05-29 16:17:28 +02:00
Konstantin Boyarinov bdbec20606 Increase GCC version to suppress unordered_map and concurrent_monitor node destruction warning (#2091) 2026-05-28 16:25:54 +02:00
Alexandr-KonovalovandCopilot Autofix powered by AI 821101aac9 Load libnuma.so.1 under Linux, as libnuma.so goes from *-dev package (#2090)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-27 12:10:32 +02:00
Ilya Isaev 41b2678845 Align PREVIEW macro usage in tests with __TBB_TEST_PREVIEW (#2089)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-05-27 11:38:10 +02:00
1c0217d5e2 Fix a race in task group dynamic dependencies implementation (#2079)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-05-26 16:55:46 +02:00
Ilya Isaev c1237e81ca Remove TBB_CPF, use TBB_TEST_PREVIEW to enable preview feature testing (#2083)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-05-22 12:32:20 +02:00
Aleksei Fedotov febb98f3bc [tbbmalloc] Add assertions about computed bin indices and masks (#2082) 2026-05-21 12:11:38 +02:00
Olga Malysheva d901b250e1 [TCM] Open source Thread Composability Manager (#2061) 2026-05-21 11:35:51 +02:00
Alexandr-KonovalovandCopilot Autofix powered by AI 26f1380e46 Factor out align_up* functions in tbb library. (#2077)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-20 15:02:50 +02:00
Ilya Isaev 1d1541dff3 Fix compilation on systems without resumable tasks support (#2081)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-05-18 16:45:37 +02:00
Ilya Isaev c2372fbbe6 Add experimental C++20 modules support (#2068)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-05-13 10:54:08 +02:00
Alexandr-Konovalov 63391bcc96 Add const to library ABI (#2075) 2026-05-13 10:24:47 +02:00
ab3ced8246 Support interleaved NUMA allocations (#2074)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-05-12 21:31:05 +02:00
Ilya IsaevandMike Voss 5ce6061afa Add RFC about C++20 modules support (#2043)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-05-12 17:40:58 +02:00
Ilya Isaev a0633a3163 Add basic C++20 modules testing, extend test_tbb_header (#1974)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-05-11 17:31:54 +02:00
Alexey Kukanov a3f1dc2171 Propose the API for NUMA interleaved allocations (#2063) 2026-05-07 19:46:24 +02:00
Olga Malysheva 22d6c1af11 Update oneTBB version to 2023.1.0 for the next release (#2073) 2026-05-05 09:30:37 +02:00
Fedotov, Aleksei 2b7ddfc432 [TCM] Add UXL Foundations Copyright 2026-04-30 16:59:25 +02:00
Fedotov, Aleksei bc8b68d1c1 [TCM] Fix codespell 2026-04-30 12:54:51 +02:00
Aleksei Fedotov 42f91b5673 [tbbmalloc] Avoid disabling 4267 and 4244 warnings (#2057) 2026-04-29 12:16:08 +02:00
Olga Malysheva 82ac48556c Fix links in GSG (#2064) 2026-04-27 18:13:28 +02:00
Aleksei FedotovandMike Voss 8018524c10 [TCM] Use CMake's TARGET_FILE generator as suggested in review
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-04-27 17:27:03 +02:00
Olga Malysheva 7f508fa86e Update Release Notes and system Requirements for 2023.0 release. (#2054) 2026-04-24 11:24:23 +02:00
Fedotov, Aleksei 7bc8577403 Introduce Thread Composability Manager (TCM)
git-subtree-dir: thread_composability_manager
git-subtree-mainline: 114d96d0ea
git-subtree-split: 57ad6817a0
2026-04-23 12:30:57 +02:00
Fedotov, Aleksei 57ad6817a0 [TCM] Remove benchmarks subdirectory in their entirety 2026-04-23 12:00:31 +02:00
Aleksei Fedotov 9341ed953d [TCM] Update license to Apache 2.0 WITH LLVM-exception (#228) 2026-04-23 12:00:25 +02:00
3fed6d6de6 Satisfy BinSkim Rule BA2004.EnableSecureSourceCodeHashing (#2060)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-23 10:57:15 +02:00
Olga MalyshevaandIlya Isaev 153feba356 Use CMake 3.12 way to search for Python interpreter when possible (#2059)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-04-23 10:54:58 +02:00
114d96d0ea Add sub-RFC for interleaving memory allocation (#2032)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2026-04-22 17:26:43 +02:00
947a53893e Document feature-test macros (#2049)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-18 12:26:52 +02:00
Ilya Isaev 0e9f1d0d09 Add missing default value for this_task_arena::end_parallel_phase (#2055)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-18 12:26:38 +02:00
fec5e0036b Add task_group::wait_for_task documentation (#2048)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-04-17 09:17:51 +02:00
1ab634cee7 Add documentation for global_control::leave_policy (#2045)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2026-04-16 14:15:12 -05:00
Alexandr-KonovalovandAleksei Fedotov f918c9c99d Support IPO build for modern Intel compilers with old cmake under Linux (#2052)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-16 18:33:44 +02:00
e6107c9849 Add documentation for core type selectors (#2047)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-04-16 09:45:19 -05:00
Mike Voss 593857e7af Added abi table to VERSIONING.md (#1868) 2026-04-16 07:51:35 -05:00
Mike Voss 038ae183c7 Added specification to doc directory (#2017) 2026-04-15 10:22:15 -05:00
petterreinholdtsenandPetter Reinholdtsen 9bab6cca23 Adjusted test_lightweight to avoid zero threads in test. (#2033)
Co-authored-by: Petter Reinholdtsen <pere@debian.org>
2026-04-14 18:04:32 +03:00
Konstantin Boyarinov e4f282e141 Add developer guide topic about FG deduction guides (#2051) 2026-04-14 15:53:03 +03:00
Konstantin BoyarinovandAlexey Kukanov f8f8f54b4c Remove "Reduction for Rvalues" from reference (#2050)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2026-04-14 15:07:33 +03:00
Aleksei Fedotov f50ec64e40 [TCM] Remove GUI-related stuff from tbb-based benchmarks (#226) 2026-04-14 13:49:53 +02:00
Ilya IsaevandMike Voss dcbaacbcff Update the example with NUMA-bound task arenas (#2044)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-04-13 09:50:53 +02:00
Konstantin BoyarinovandMike Voss 38d73c35d1 Add documentation for resource_limiter and resource_limited_node (#2046)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-04-12 10:14:14 +03:00
Aleksei Fedotov 562746e49e Streamline the test for reserving slots in constrained arena (#2016) 2026-04-09 15:15:12 +02:00
Aleksei Fedotov 430e2bcbc7 Add RFC about TCM open sourcing (#1970) 2026-04-09 11:57:57 +02:00
Dmitri Mokhov 70c4e61e54 Move "Advanced Core Type Selection" RFC from "proposed" to "experimental" (#2005) 2026-04-08 13:36:00 -05:00
dependabot[bot] 2f1446bf20 Bump microsoft/setup-msbuild from 2.0.0 to 3.0.0 (#2037)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 14:30:35 +03:00
dependabot[bot] c0a57b9b06 Bump step-security/harden-runner from 2.15.1 to 2.16.1 (#2036)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 14:30:15 +03:00
dependabot[bot] 3995f88b5a Bump actions/download-artifact from 8.0.0 to 8.0.1 (#2035)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 14:29:56 +03:00
dependabot[bot] a946ef4152 Bump github/codeql-action from 4.32.4 to 4.35.1 (#2034)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 14:29:34 +03:00
navvyswethgraphics 49c45b1bcb Fix ARM64EC builds by excluding ARM64EC from x64(_M_X64) detection on Windows (#2030) 2026-04-02 21:18:27 +02:00
petterreinholdtsenandPetter Reinholdtsen 846e077898 Don't use CPU binding on GNU Hurd (#2038)
Co-authored-by: Petter Reinholdtsen <pere@debian.org>
2026-04-02 13:35:51 +02:00
Aleksei Fedotov 8af52d48ff [TCM] Deprecate existing version API and replace it with tcmGetVersion() (#224) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov d687233644 [TCM] Rectify expectations in test constrained requests (#223)
If resources are constrained by a number of available CPUs rather than by a mask (e.g., via cgroups), two test cases in test_constrained_requests required reconsideration. This patch reworks some of the checks in the test. Also, it adds further TODOs to address later.
2026-04-02 12:22:48 +02:00
Aleksei Fedotov e049453269 [TCM] Add explicit linking with pthread (#222) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov fc210f475f [TCM] Add tests for cgroup support (#220) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 0625bf7d60 [TCM] Do not specify /analyze flag for Intel LLVM compiler (#221) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 8668efe5c2 [TCM] Update composable scenarios benchmark to add it to performance CI (#213) 2026-04-02 12:22:48 +02:00
5fde898d69 [TCM] Add modulefiles for TCM (#219)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Olga Malysheva <olga.malysheva@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:48 +02:00
Aleksei Fedotov 12fb2cc3b5 [TCM] Do not assert on the callback return code (#217) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 609af5daf4 [TCM] Fix copyright year (#218) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 2e80ac2890 [TCM] Avoid the use of deleted std::string(nullptr) constructor (#214) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 84454799c3 [TCM] Add a bit more details in the test logs (#216) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov d1ccf3207a [TCM] Fix helper that checks availability of certain # of resources (#215) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 9896332bc9 [TCM] Adapt the test_basic_apis to various number of platform resources (#212) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 747b4100f8 [TCM] Update the copyright for files that were changed this year (#210) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 0410223edd [TCM] Fix TCM assert and extend testing of constrained requests (#199) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 810afd06cd [TCM] Capture std::thread::id and print its consecutive number (#208) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 7af0e6a88c [TCM] Fix ill-defined loop when converting permit flags to std::string (#207) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 02465adc84 [TCM] Suppress MSVC contradictory warning C6387 about possible nullptr (#209) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 28f847d687 [TCM] Fix benchmarks build (#206)
This fixes various issues when building TCM benchmarks using Intel LLVM C++ compiler. The issues include:
- `max_index` is unused variable in case of a release build.
- Destructor in `fractal_runtime` is not defined as virtual while there are virtual methods.
- `~fractal_runtime_tbb` has exception specification that is more lax than the one of the base class.
- `num_frames` is initialized before functor `f` in `fractal_runtime`.
- `num_threads` is unused.

Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:48 +02:00
Ilya IsaevandAleksei Fedotov 1e2c9b413d [TCM] fractal: Improve CPU utilization by adjusting OpenMP scheduling settings (#203)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:48 +02:00
Copilot 1364c776c7 [TCM] Avoid race on reading tcm_state_epoch in make_new_permit (#202) 2026-04-02 12:22:48 +02:00
Olga Malysheva 9a47f6b30e [TCM] Update version to 1.5.0 for oneAPI 2026.0 (#204) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 482237977f [TCM] Fix cmake minimum required version and copyright year (#205) 2026-04-02 12:22:48 +02:00
Ilya IsaevandAleksei Fedotov d463050bf1 [TCM] Allow runtime permutations in Seismic benchmark (#198)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:48 +02:00
Ilya IsaevandAleksei Fedotov e0ddda3471 [TCM] Respect CFS CPU constraints (#191)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:48 +02:00
Aleksei Fedotov 12e4f6b122 [TCM] Regard unconstrained requests together with constrained (#193) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov 992784d786 [TCM] Sort test runs by order of appearance within the translation unit (#200)
Add filename and line number info to each test case.
2026-04-02 12:22:48 +02:00
Ilya Isaev 516a17662b [TCM] Add vars scripts for TCM (#181)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:48 +02:00
Aleksei Fedotov 1b452c7011 [TCM] Move alternating clients test and rename it (#197) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov b4fa6a641a [TCM] Log test header and footer to standard out stream (#196) 2026-04-02 12:22:48 +02:00
Aleksei Fedotov feb041f752 [TCM] Make TCM tests independent from each other (#194) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov 007b7c3b90 [TCM] Introduce RFC process (#183) 2026-04-02 12:22:47 +02:00
Ilya Isaev 777c2f0359 [TCM] Port fractal sample from oneTBB examples (#188)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 978febc1db [TCM] Introduce test logger and make reporting functionality using it (#189) 2026-04-02 12:22:47 +02:00
Ilya Isaev cf201f4efa [TCM] Improve matrix write/read in Cholesky benchmark (#187)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Olga Malysheva 4b06283961 [TCM] Add hardening flags to the library build (#186) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov be2c0ab2ba [TCM] Use portable "LINKER" option on Windows (#185) 2026-04-02 12:22:47 +02:00
Olga Malysheva e7e55adad8 [TCM] Set TCM version to 1.4.0 for oneAPI 2025.2 (#182) 2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 1b7bef1a5e [TCM] Suggest to use TCM after a couple of failed tcmConnect attempts (#180)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Olga Malysheva 5f0125be6a [TCM] Add new SDL-recommended flags (#178) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov 29b4160dd1 [TCM] Suppress overzealous MSVC warning (#179)
MSVC is pessimistic about the number of bytes to be written into the array during its initialization. The 'permit_size' is always greater than the warning shows. So, suppressing it.
2026-04-02 12:22:47 +02:00
Ilya Isaev 1b28088c63 [TCM] Workaround warning -Wcast-function-type-mismatch (#177)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov ae45b783c9 [TCM] Fix table formatting in the docs (#176) 2026-04-02 12:22:47 +02:00
Ilya Isaev 35dbb2d84f [TCM] Prioritize HWLOCROOT variable (#175)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Olga Malysheva 572b0224c9 [TCM] Update version to 1.3.0 for oneAPI 2025.1 (#174)
Although the library doesn't include any interface changes but the package includes the new HWLOC version. So, it was decided to increase the minor version and keep it in sync with the interface version for better debuggability from internal users perspective. We might change this approach in future, especially if TCM is open sourced.
2026-04-02 12:22:47 +02:00
Olga MalyshevaandAleksei Fedotov 51f22034ec [TCM] Add new SDL-recommended flags (#173)
* Add new SDL-recommended flags - /LTCG, /sdl, /Gy as well as /INCREMENTAL:NO and /GL

---------

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei FedotovandIlya Isaev 1caa795811 [TCM] Improve reporting in resource balancing test (#171)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 3b8da48035 [TCM] Add test for disconnecting an owning client (#169)
Also, start adding high-level routines in testing infrastructure that check for TCM invariants such as all resources are occupied or available, etc.
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 77f3a9e8fa [TCM] Streamline validation of a constrained request (#172) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov 5e572a146c [TCM] Fix incorrect logging in test utils (#170)
Due to assignment to the `permit_handle` in `tcmRequestPermit` function,
test always logged that the permit request was made on an existing
permit handle.
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 7cd5abdaaf [TCM] Isolate HWLOC use in tests (#168) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov 66fb804d7b [TCM] Avoid linking HWLOC where it isn't needed (#167)
Don't link HWLOC library with the tests that do not require it
2026-04-02 12:22:47 +02:00
Olga Malysheva 5cb8edd561 [TCM] Add SECURITY.md file (#165)
* Add SECURITY.md file (PSE recommendation)
2026-04-02 12:22:47 +02:00
Olga Malysheva d85ca32271 [TCM] Add dependabot.yml (#166) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov 613c650547 [TCM] Fix year in copyright notices of a couple of files (#164) 2026-04-02 12:22:47 +02:00
Ilya Isaev 7a99b62f8c [TCM] Bump CMake minimum required version to 3.5 (#163)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov a28ab310bb [TCM] Release client resources during disconnection (#161)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 6a8f5e9cb0 [TCM] Re-read of the permit state after taking the lock for permit deactivation (#159)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 8b48915475 [TCM] Fix compilation warnings in benchmarks (#160)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 439ab179d1 [TCM] Add flag that restrict HWLOC's interference with Windows process affinity (#157)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 51d30cbe44 [TCM] tcmIdlePermit: renegotiate only when there is a demand (#158)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 9bf145f56e [TCM] Allow subsequent deactivations of already deactivated permit (#156)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 606676b7ec [TCM] Load TCM library in the test_premature_exit by filename (#153)
This will make test_premature_exit more robust.

Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 9fbaa7d5ee [TCM] Fix signed/unsigned mismatch in permit tracer (#154)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Olga Malysheva e0e9baeccc [TCM] Update version to 1.2.0 (oneAPI 2025.0) (#151) 2026-04-02 12:22:47 +02:00
Ilya Isaev 490649535b [TCM] Revert "Invoke callback for initiator's client in tcmActivatePermit function …" (#150)
This reverts commit 1c4f0a0d7545b9933498c6cc17ed05d9d260bcf7.
2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 0f5a4d15ee [TCM] Fix rigid_concurrency permits overriding lazy_inactive_permit pointer (#148)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 31c4d2524b [TCM] Invoke callback for initiator's client in tcmActivatePermit function (#142)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 4386f8d4bb [TCM] Move checking permit_handle for nullptr under is_valid() (#143)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov f1043c27a9 [TCM] Add permit tracer (#141)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 987c503f39 [TCM] Fix warning about unsigned value being assigned to a signed type (#140)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov cc1cac0b1c [TCM] Do not store useless active rigid concurrency permits (#138)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 5c7ab0f677 [TCM] Revise expectations in the test with overlapping clients (#137)
The test has incorrect assumption and is too white-boxish. This patch makes it less white-boxish, but still assumes that TCM negotiates minimal number of permits to satisfy minimum of requested resources.
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 9e937f144f [TCM] Fix oneMKL and oneTBB mentioning in the documentation (#135) 2026-04-02 12:22:47 +02:00
Ilya Isaev 4096b5af51 [TCM] Port Cholesky benchmark from oneTBB repo to TCM with adjusted build parameters (#134)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov ae508fd264 [TCM] Add warnings about changing permit's state that affects container comparators (#133) 2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov f7013971d6 [TCM] Determine primary thread during resource distribution for nested case (#129)
This patch makes an assumption in TCM that the requesting thread is going to be registered with the permit being obtained, and, therefore, makes TCM searching for less by one resource in case the thread that requesting a permit is already registered with another, and, hence, was given a resource previously.

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov b6efa13c1c [TCM] Add possibility to request permit in inactive state (#132) 2026-04-02 12:22:47 +02:00
Pavel KumbrasevandIlya Isaev 7d90f4bd35 [TCM] Initial implementation of Fuzz testing for TCM environment variables (#110)
Implemented a simple Fuzz function that set TCM env variables with random values. Validate that TCM is working by executing basic test.
---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 26889f9d61 [TCM] Improve internal profiling (#124)
This simplifies the interface along with increasing the amount of statistics gathered.
2026-04-02 12:22:47 +02:00
Olga Malysheva bdba7ddcf0 [TCM] Update version to 1.1.0 for 2024.2 release. (#131)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov d1a6341203 [TCM] Re-activating permit w/o resource search when minimum is satisfied (#130) 2026-04-02 12:22:47 +02:00
Ilya Isaev 5faa24e84b [TCM] Fix copyright year in .rc (#128)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov c9ac3d1c89 [TCM] Restrict load-time search in Current Working Directory on Windows (#126)
Restrict Windows loader to look in CWD if it isn't in Safe load list
2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov df1de71f25 [TCM] Improve code coverage (#125)
Removed FCFS.
Removed unused helper functions.
Removed unused system_topology functions which was there due to borrowing from TBBBind.
Added get_permit_state function to clean up code a little bit.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 1a89c385ae [TCM] Automatic year substitution in resource file (#123) 2026-04-02 12:22:47 +02:00
Ilya Isaev 98f261fb7a [TCM] Release resources when releasing lazy deactivated permit (#122)
There is a missed spot in TCM which testing didn't cover: releasing of lazy inactive permit. Permit didn't give back its resources and it could lead to not getting granted concurrency for newer permits.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Ilya IsaevandFedotov, Aleksei dbd711db45 [TCM] Add exclude-libs option for Intel compilers (#121)
When using -static-intel option, Intel Compiler statically links internal libraries like libimf. Their symbols are exported automatically which can lead to unexpected issues due to mixed symbols in scenarios when multiple libraries with same dependencies are present. To eliminate this issue, --exclude-libs ALL link option is used.

Co-authored-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev 11ecbeccad [TCM] Fix copyright (#120)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 1a9dcd8e7a [TCM] Enable CMake plugin mechanism (#119)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev 9b7d6eded9 [TCM] Increase TCM patch version (1.0.0 -> 1.0.1) (#118) 2026-04-02 12:22:47 +02:00
Ilya IsaevandAleksei Fedotov 44cf932630 [TCM] Keep granted resources for inactive permit when there is no demand (#115)
This patch slightly changes logic of permit's deactivation to make it work in more "lazy" manner. This means that in case where there is no demand for resources (in this case having other active or pending permits), deactivation of the permit will work like idle - keeping the resources and just change a state of the permit. This allows to quickly activate this permit later.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Olga Malysheva 1f44f04e19 [TCM] Add copyright info to Windows DLLs (#117)
* Add resource file .rc to produce DLL info with copyrights on Windows

---------

Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev 03348a07cb [TCM] Add missed -fvisibility-inlines-hidden flag for Intel Classic Compiler (#116)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev e909cb9683 [TCM] Remove indirection from ThreadComposabilityManager's pimpl implementation (#114)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov ceaf406e16 [TCM] Use special predefined variable __func__ for automatic test naming (#101)
Also split test for TCM environment to have canonical appearance.
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 041519e696 [TCM] One time permit memory allocation (#109)
Make one-time allocation for representation of a permit
2026-04-02 12:22:47 +02:00
Pavel Kumbrasev 8e5dcb00f9 [TCM] Fix missed callback (#113)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev 3965761081 [TCM] Add SDL compile flags (#112)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev 95e6d62c1b [TCM] Remove processing internal envvars to mitigate potential security risks (#111)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 5d4faa10d5 [TCM] Extend tests for incorrect requests (#106) 2026-04-02 12:22:47 +02:00
Aleksei Fedotov 63a6013c67 [TCM] Return invalid argument when releasing nullptr (#107) 2026-04-02 12:22:47 +02:00
Olga Malysheva cf7f965f80 [TCM] Fix the product name (TCMLIB-80) (#108)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2026-04-02 12:22:47 +02:00
Ilya Isaev 1bf071d4ab [TCM] TCM_DISABLE->TCM_ENABLE, remove -beta suffix, add Date and Time info (#105)
TCM is now DISABLED by default, thus replace opt-out envvar by opt-in one. Remove "-beta" suffix from the version. Add "BUILD TIME"  and "COMMIT ID" information to be available with TCM_VERSION=1

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 3b8ac51dda [TCM] Insert into pending container only if request was not satisfied (#102) 2026-04-02 12:22:47 +02:00
Pavel KumbrasevandAleksei Fedotov fa1cab976f [TCM] Add time tracker implementation (#104)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-04-02 12:22:47 +02:00
Aleksei Fedotov 73ee170d77 [TCM] Add indents in the tests' output (#103)
Add indents in the tests' output to simply log analysis
2026-04-02 12:22:47 +02:00
petterreinholdtsenandPetter Reinholdtsen 34b3d4b73b Provide useful PTHREAD_STACK_MIN value if OS do not define it. (#2026)
Co-authored-by: Petter Reinholdtsen <pere@debian.org>
2026-03-31 10:38:49 +02:00
petterreinholdtsenandPetter Reinholdtsen 88482f5f1a Extend gcc 12-14 workaround in notify_one_relaxed() to 15 (#2029)
Co-authored-by: Petter Reinholdtsen <pere@debian.org>
2026-03-31 09:47:48 +02:00
petterreinholdtsenandPetter Reinholdtsen e020cf2e63 Tests: disabled increased_priority_guard on GNU Hurd. (#2028)
Co-authored-by: Petter Reinholdtsen <pere@debian.org>
2026-03-31 09:32:20 +02:00
Dmitri Mokhov 01badbebb0 Revert "Rework get_task and steal_task to better interact with out_of_work checks (#1779)" (#2022) 2026-03-25 10:09:04 -05:00
2561dc7a3f Improve resource_limited_node coverage (#2018)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-24 11:06:37 +02:00
Dmitri Mokhov 1911b28398 Fix ODR violation crash in global_control::active_value() for static builds (#2020) 2026-03-23 09:38:49 -05:00
Ilya Isaev e327de0d69 Skip leak warning test when ASAN is enabled (#2019)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-03-23 11:50:47 +01:00
Aleksei Fedotov c593e32768 Fix failure regex for tbbbind tests with pkg-config HWLOC target (#2021)
tbbbind tests linked with HWLOC found using pkg-config used incorrect failure regular exression, leading to test always passed.
2026-03-23 11:29:26 +01:00
ef6f9b5ea5 Account for cgroups constraints in the NUMA task arena conformance test (#2014)
Co-authored-by: Aleksei Fedotov <fedotov.aleksei@gmail.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-03-19 09:42:53 +01:00
5309534d7b Add -fcf-protection=full conditionally. (#2015)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2026-03-18 14:34:35 +01:00
Dmitri Mokhov cbc7a52b08 Move "Global Control Parameter for Worker Fast Leave Behavior" RFC from "proposed" to "experimental" (#2006) 2026-03-17 10:34:53 -05:00
Aleksei Fedotov 767bb681de Replace hwloc_bitmap_t with tcm_cpu_mask_t (#2013)
oneTBB should not know anything about HWLOC interfaces, but is aware about TCM. Therefore, where
necessary it should rely on either TBBBind or TCM instead, not HWLOC. Since TBBBind does not define
the type representing the CPU mask, replace all the references of mask from HWLOC to mask from TCM.
2026-03-16 17:36:38 +01:00
Ilya Isaev 5c785d7b00 Use single year in copyright, update the checker (#2009)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-03-16 17:36:09 +01:00
Aleksei Fedotov 1727c70c52 Add necessary lines to fulfill brief scanner requirements (#2012) 2026-03-16 14:04:40 +01:00
Dmitri Mokhov af05780cce Add constraints affinity mask export from TBBBind to ensure cross-hwloc consistency with TCM (#1990) 2026-03-13 16:17:30 -05:00
Mike Voss 5ee6eb9df6 Fixed use of wrong "c" character (#2011) 2026-03-13 14:21:07 -05:00
Dmitri Mokhov e793c9ab10 Remove __TBB_ARENA_BINDING macro (#2008) 2026-03-13 13:34:13 -05:00
Aleksei Fedotov 9ebef4f972 Add tests for cgroup support (#2004) 2026-03-13 18:33:40 +01:00
Ilya Isaev b6ffd275a2 Fix C2398 compilation error in test_task.cpp (#2010)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-03-13 15:09:40 +01:00
Ilya Isaev 1368bbf89b Fix a set of AddressSanitizer and ThreadSanitizer issues (#1889)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-03-13 10:16:50 +01:00
Konstantin Boyarinov fef013d2d4 Fix warning in resource_limited_node test (#2007) 2026-03-12 16:33:44 +02:00
Dmitri MokhovandIlya Isaev eaa50b33d0 [RFC] Global Control Parameter for Worker Fast Leave Behavior (#1923)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-03-11 11:25:49 -05:00
Konstantin Boyarinov 77972437ac Introduce feature-test macro for task_group dependencies (#1993) 2026-03-11 17:59:12 +02:00
3f66347ae1 [RFC] Advanced Core Type Selection (#1917)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-03-11 09:31:03 -05:00
Konstantin Boyarinov a7ecf37807 Improve task_group::wait_for_task testing (#2001) 2026-03-10 18:00:36 +02:00
Aleksei Fedotov 40a0c423be Explicit type cast to avoid compilation issue (#2000)
`-pedantic` or `-pedantic-errors` compiler options produce compilation issues. This patch fixes them.
2026-03-10 14:57:37 +01:00
Konstantin Boyarinov 3a41cfb933 Disable resource_limited_node test case for systems without resumable tasks (#2003) 2026-03-10 13:01:12 +02:00
Dmitri Mokhov 104db7fba8 Add parallel phase feature test macro and simplify leave policy initialization logic (#2002) 2026-03-10 05:38:15 -05:00
Konstantin Boyarinov d38d12c81f [RFC] Add arena and submit method preservation as exit criteria for task_group dependencies (#1817) 2026-03-09 18:43:04 +02:00
Olga Malysheva fa3c37bf40 Update harden-runner manually to fix the issue (#1996) 2026-03-09 15:21:27 +01:00
Dmitri Mokhov 19f7d3331b Fix failure of create_numa_task_arenas/selector combo test (#1998) 2026-03-09 08:16:35 -05:00
Konstantin Boyarinov fb390c56dd Fix resource_limited_node exception safety (#1997) 2026-03-06 18:48:55 +02:00
Mike Voss 03c286d058 Update blocked_range.h to remove unneeded include (#1995) 2026-03-06 10:11:20 -06:00
Alexandr-Konovalov 6f0ba27e6c Report if IPO is requested but disabled because not supported (#1994) 2026-03-06 09:40:57 +01:00
Dmitri Mokhov 0b30ba316c Add a global_control parameter to toggle worker fast leave behavior (#1991) 2026-03-06 10:39:54 +02:00
Dmitri MokhovandIlya Isaev 00711ab64a Implement multiple core type constraints using selectors (#1987)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-03-06 10:39:23 +02:00
Konstantin BoyarinovandMike Voss 5991385163 Add resource_limited_node and resource_limiter to the Flow Graph (#1964)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-03-06 10:15:44 +02:00
Konstantin Boyarinov 747cab46cb Waiting for Individual tasks in task_group API (#1887) 2026-03-06 08:23:57 +02:00
f889fae4ad RFC for Waiting for Individual Tasks in task_group (#1862)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2026-03-05 17:48:08 +02:00
Ilya Isaev 97f44bc428 Clang build on Windows: address comments from #1936 (#1992)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-03-05 15:51:14 +01:00
JustinZhuandjustinzhu@home 746ec661c8 Fix Windows Clang compiler flags in CMake configuration (#1936)
Co-authored-by: justinzhu@home <zhuguangwen@zealshow.com>
2026-03-05 12:20:10 +01:00
Konstantin BoyarinovandRuslan Arutyunyan b56a6c71bc Flow Graph deduction guides improvements, support for newly added body types (#1734)
Co-authored-by: Ruslan Arutyunyan <ruslan.arutyunyan@intel.com>
2026-03-05 12:48:11 +02:00
Nikolay PetrovandAleksei Fedotov 0bd0ae8d3d feat(python): Add free-threading (NOGIL) Python 3.13+ support (#1965)
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-03-04 10:44:02 -06:00
Konstantin Boyarinov 51aa602dfe Revert the constructor of tbb::flow::resource_limiter (#1989) 2026-03-03 19:45:12 +02:00
Alexey KukanovandKonstantin Boyarinov 463b603aef Update the API proposal for the resource limited node (#1979)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2026-03-02 20:38:26 +01:00
Konstantin Boyarinov d4a1c23305 Fix copyright check when there are no files with copyright changed (#1986) 2026-03-02 15:56:51 +02:00
Ilya Isaev 914f8cd7ae Mark functions and variables as inline to avoid "TU-local entity exposure" issue (#1960)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-03-02 11:16:55 +01:00
dependabot[bot] 662602c648 Bump github/codeql-action from 4.32.0 to 4.32.4 (#1982)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:31:45 +02:00
dependabot[bot] 06ef3676c8 Bump actions/upload-artifact from 6.0.0 to 7.0.0 (#1983)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:31:21 +02:00
dependabot[bot] 729174d804 Bump step-security/harden-runner from 2.14.1 to 2.15.0 (#1984)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:30:59 +02:00
dependabot[bot] 886a3ff7e5 Bump actions/download-artifact from 7.0.0 to 8.0.0 (#1985)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 09:30:05 +02:00
Konstantin Boyarinov 96ba55042d Fix Task Dynamic Dependencies when RTTI is disabled (#1928) 2026-02-27 19:30:14 +02:00
Stéphane GINIER e28b9506b6 Fix compilation for platforms with non-resumable tasks (#1977) 2026-02-27 14:33:09 +01:00
Mateusz Jakub Fila 492c01ee2b update "mutex flavors" docs (#1973) 2026-02-24 13:12:33 -06:00
Konstantin Boyarinov 1009400588 Increase LLVM compiler version for allocator::destroy deprecation warning (#1975) 2026-02-24 15:23:45 +02:00
f71cccc781 Distributed size for concurrent ordered containers (#1803)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-02-24 11:47:06 +02:00
50fe7ef4bf Add RFC for flow::resource_limited_node and flow::resource_provider (#1957)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2026-02-23 18:20:07 +02:00
Konstantin Boyarinov f01f35d917 Remove std::aligned_storage usage from tests (#1971) 2026-02-18 15:22:11 +02:00
Aras Pranckevičius a5967f0fcf Build: do not include windows.h from header files (#1932) 2026-02-17 16:12:36 +02:00
Ilya IsaevandOlga Malysheva e13a512327 Fix tests compilation when using native Clang on Windows (#1959)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Olga Malysheva <olga.malysheva@intel.com>
2026-02-17 08:56:29 +01:00
Stéphane GINIER 51dffe9487 Fix rc file Non-ASCII 8-bit in non-Unicode string (#1968) 2026-02-16 16:17:14 +01:00
Olga Malysheva e8aa5f1ee3 Add UXL copyright to DLL properties (#1958) 2026-02-11 18:14:58 +01:00
Ilya Isaev 7cb69a7e1d Use correct Intel copyright year for proxy.cpp (#1963)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-02-10 12:49:36 +01:00
Lukasz Dorau a32d75796d Do not initialize pointers to original functions in (libc_)free (#1956)
Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2026-02-09 17:23:39 +01:00
dependabot[bot] 3ebfedd863 Bump github/codeql-action from 4.31.9 to 4.32.0 (#1953)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 14:12:49 +02:00
dependabot[bot] 2bb9ca5156 Bump actions/checkout from 6.0.1 to 6.0.2 (#1954)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 14:12:31 +02:00
dependabot[bot] fa296991ef Bump step-security/harden-runner from 2.14.0 to 2.14.1 (#1955)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-03 14:12:08 +02:00
Olga Malysheva 476a5a792b Correct product name (#1952) 2026-01-30 16:16:01 +01:00
Olga Malysheva ba3c297a39 Add missed copyright notice to the newly added file (#1951) 2026-01-26 19:42:59 +01:00
Ganael LaplancheandKonstantin Boyarinov 8b9ca4d80b FreeBSD: Add affinity support to tests (#1950)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2026-01-26 15:50:46 +02:00
Ganael LaplancheandKonstantin Boyarinov 8948cdb92d FreeBSD: fix several tests (#1945)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2026-01-23 15:30:26 +02:00
Alexandr-Konovalov 70b5bb9fae Use compiler's modern name, document cmake controls. (#1914) 2026-01-20 13:31:41 +01:00
Alexandr-Konovalov 2c22d159f0 Fix build of sycl examples under Windows (#1948) 2026-01-20 13:31:18 +01:00
Ben GreinerandIlya Isaev 360e0178e7 Python bindings: Replace direct setup.py usage with PEP517 (pip) (#1941)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2026-01-15 15:48:41 +01:00
Konstantin BoyarinovandAleksei Fedotov 05387d33d6 Extend blocked_nd_range construction test with necessary checks (#1933)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-01-13 21:38:59 +02:00
8eef2c6e4f Move CTAD for blocked_nd_range out of preview (#1929)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-01-13 15:45:46 +02:00
Konstantin Boyarinov dfcb16b10c Minor fix for copyright check (#1944) 2026-01-08 16:17:51 +02:00
dependabot[bot]andBoyarinov, Konstantin 0e7773e040 Bump step-security/harden-runner from 2.13.3 to 2.14.0 (#1937)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Boyarinov, Konstantin <konstantin.boyarinov@intel.com>
2026-01-08 15:03:26 +02:00
dependabot[bot]andBoyarinov, Konstantin fa1f20e8a7 Bump github/codeql-action from 4.31.7 to 4.31.9 (#1938)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Boyarinov, Konstantin <konstantin.boyarinov@intel.com>
2026-01-08 15:00:01 +02:00
dependabot[bot] b37573f1e4 Bump actions/download-artifact from 6.0.0 to 7.0.0 (#1939)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 14:54:04 +02:00
dependabot[bot] a225504b36 Bump actions/upload-artifact from 5.0.0 to 6.0.0 (#1940)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 14:51:59 +02:00
Ilya Isaev a337e29656 Bump copyright year in files affected by PR1902 (#1942)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-01-08 13:48:14 +01:00
Konstantin BoyarinovandIsaev, Ilya 1c0db8271a Fix and extend the copyright check (#1810)
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
2026-01-08 14:44:25 +02:00
Ilya IsaevandAleksei Fedotov 0f28710440 Implement API to create NUMA-bound task arenas (#1902)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2026-01-07 09:25:39 +01:00
Alexey KukanovandKonstantin Boyarinov f9955004ed Rework get_task and steal_task to better interact with out_of_work checks (#1779)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-12-19 14:23:31 +01:00
dependabot[bot] ce30448720 Bump actions/checkout from 6.0.0 to 6.0.1 (#1922)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 18:07:14 +02:00
dependabot[bot] 4eebefbb68 Bump step-security/harden-runner from 2.13.2 to 2.13.3 (#1921)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 18:06:54 +02:00
dependabot[bot] 09076c03ee Bump github/codeql-action from 4.31.5 to 4.31.7 (#1920)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 18:06:34 +02:00
Dmitri Mokhov db7891a246 Remove unnecessary friend operator (#1931) 2025-12-15 08:01:04 -06:00
Olga Malysheva 52a7b37398 Change dependabot schedule to monthly run (#1925) 2025-12-09 17:50:26 +01:00
Ilya Isaev 99d0c48180 Update from macos-13 to macos-15-intel due to image retirement (#1924)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-12-09 13:39:15 +01:00
Olga MalyshevaandKonstantin Boyarinov 1b3edbf85c Update MAINTAINERS.md and CODEOWNERS (#1910)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-12-09 12:30:09 +01:00
dependabot[bot] b963626302 Bump step-security/harden-runner from 2.13.1 to 2.13.2 (#1908)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 18:51:43 +02:00
dependabot[bot] dd335b88a0 Bump github/codeql-action from 4.31.2 to 4.31.5 (#1919)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 18:35:11 +02:00
dependabot[bot] fb35d72cdd Bump actions/checkout from 5.0.0 to 6.0.0 (#1915)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-03 18:34:42 +02:00
Konstantin BoyarinovandAleksei Fedotov 1114d23f45 Flow Graph - remove C++03 legacy (#945)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-12-01 17:09:50 +02:00
Olga Malysheva 0cd32ab10a Use separate Coverity project for Windows scan (#1886) 2025-11-10 20:33:48 +01:00
Ilya Isaev f5d9aa92fa Add arena constraints testing on Linux (#1905)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-11-10 12:03:43 +01:00
Dmitri Mokhov cfd170368e Remove inadvertently specified -fexceptions for TBBMalloc on WASM (#1893) 2025-11-06 09:28:33 -06:00
Konstantin Boyarinov de0daa2b2f Add new ittnotify hits to codespell ignore list (#1901) 2025-11-05 13:14:14 +02:00
Olga Malysheva 67cd2d0031 Update doctest to version 2.4.12 (#1896) 2025-11-05 11:32:37 +01:00
Olga Malysheva 560ea5fd50 Update ittapi to 3.26.4 (#1895) 2025-11-04 11:16:23 +01:00
dependabot[bot] 3b736d8964 Bump actions/download-artifact from 5.0.0 to 6.0.0 (#1883)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 23:08:23 +01:00
dependabot[bot] 4eea6498d1 Bump actions/upload-artifact from 4.6.2 to 5.0.0 (#1884)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 23:07:50 +01:00
dependabot[bot] 0993eb2597 Bump github/codeql-action from 4.30.9 to 4.31.2 (#1894)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-03 08:31:52 +02:00
Olga Malysheva 537a62c868 Run CodeQL only when the source code and tests changed (#1891) 2025-10-30 09:38:43 +01:00
Olga Malysheva a4d9201841 Update oneTBB version to 2023.0.0 for the next release (#1890) 2025-10-29 18:18:42 +01:00
Olga MalyshevaandMike Voss 83ffdf71d1 Update Release Notes and System Requirements for 2022.3 release. (#1881)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2025-10-28 21:18:00 +01:00
f07d4df23a Documentation for Task Group Dynamic Dependencies (#1863)
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2025-10-21 18:58:23 +03:00
dependabot[bot] d43b8c3243 Bump github/codeql-action from 4.30.8 to 4.30.9 (#1880)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-21 15:00:39 +03:00
Ilya Isaev ed1d7a7fbf [Documentation] Use task_arena interoperability functionality with task_group (#1866)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-10-21 12:00:47 +02:00
eleir9268 6c1ea129c2 Fix tests on QNX (#1865) 2025-10-20 10:12:51 +02:00
47d2b2c88b Add tasking documentation to user guide (#1791)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-10-17 15:22:58 -05:00
Olga Malysheva 9aa510a4d3 Collect Release notes from all releases in the master (#1878) 2025-10-17 10:44:29 +02:00
Dmitri Mokhov 110462de33 Documentation for Custom Assertion Handler (#1873) 2025-10-16 16:29:01 -05:00
dependabot[bot] 52323150cf Bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#1869)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 11:49:59 +03:00
dependabot[bot] 589c986356 Bump github/codeql-action from 3.30.3 to 4.30.8 (#1875)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-13 11:49:45 +03:00
Dmitri Mokhov 80b15efc67 Fix parallel phase documentation example path (#1874) 2025-10-10 07:48:16 -05:00
Alexey Kukanov 4b123127e7 Move task_arena_waiting/task_group_interop to supported RFCs (#1864) 2025-10-06 13:45:57 +02:00
Konstantin Boyarinov 3df32aa46d Fix returning an empty task_handle from task_group task (#1867) 2025-10-05 17:43:17 +03:00
Konstantin Boyarinov 981eb42aee Remove dead function from task_handle class (#1860) 2025-09-22 19:05:25 +03:00
Alexey Kukanov 6f468b0385 Remove outdated extensions from the reference (#1855) 2025-09-19 13:45:46 +02:00
Mike VossandAleksei Fedotov 5ce1cc8c54 Use execution_slot to ensure backwards compatibility (#1853)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-09-18 13:24:48 -05:00
Ilya Isaev 3bb1c639f1 Suppress warning C4611 in MSVC (#1854)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-09-18 16:57:01 +02:00
dependabot[bot] 63dc0389da Bump github/codeql-action from 3.30.1 to 3.30.3 (#1851)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-17 12:02:37 +02:00
dependabot[bot] 39197401ee Bump step-security/harden-runner from 2.13.0 to 2.13.1 (#1850)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-16 21:41:09 +02:00
Łukasz Plewa f42e37262b add assert to suppress coverity issue (#1846) 2025-09-15 15:37:17 +02:00
Alexandr-Konovalov a17e0823ab Do not load TBBbind, only use already loaded (#1847)
The test manually load TBBbind. Previously the test repeated the TBBbind load procedure from TBB library, so potentially the test could load a TBBbind different from one loaded by the TBB library. After the change no new load is performed, only search between already loaded dynamic libraries. This resolves the potential issue mentioned above.
2025-09-15 11:53:28 +02:00
91af3aea3a Make task_group::wait more thread safe (#1780)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-09-12 11:39:06 -05:00
Konstantin BoyarinovandIlya Isaev 49b71fb80f [CI] Cancel existing workflow in case of new commit in the feature branch (#1848)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2025-09-12 18:34:58 +03:00
Alexandr-KonovalovandKonstantin Boyarinov 9d68318891 Fix missing brief covers for test_tbb_version.cpp (#1845)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-09-12 12:13:15 +02:00
7981bb4083 Update status of Custom Assertion Handler feature (#1838)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2025-09-11 19:13:13 +02:00
Alexandr-KonovalovandKonstantin Boyarinov 5154cf5f96 Add test for custom assertion handler inside TBBbind (#1828)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-09-11 19:12:39 +02:00
Federico Ficarelli 2a483d2314 Fix ASan detection on clang (#1842) 2025-09-11 16:03:28 +02:00
Zizheng Guo 33862d979c Fix/suppress new GCC warnings (#1752) 2025-09-11 16:48:01 +03:00
wszqkzqk e574119686 Only enable fcf-protection on x86 based processors for clang (#1792)
Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com>
2025-09-11 15:43:53 +02:00
Aleksei FedotovandIsaev, Ilya aea8ce893c Support CPU resource constraints set using cgroups (#1777)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-09-10 13:19:07 +02:00
Konstantin Boyarinov ee718990c2 Enable TTAS strategy for spin_mutex and queuing_mutex (#1829) 2025-09-09 17:53:32 +03:00
Ilya Isaev b1d5aa29a4 Support assertion handler testing when tests compiled with -fno-exceptions (#1843)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-09-09 15:23:34 +02:00
Konstantin Boyarinov 132268ddd0 Fix assertion in task_handle_task::finalize (#1839) 2025-09-08 15:27:39 +03:00
dependabot[bot] f309ff7cf3 Bump github/codeql-action from 3.29.11 to 3.30.1 (#1840)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 12:33:12 +03:00
dependabot[bot] d9cfc65f8d Bump actions/labeler from 5.0.0 to 6.0.1 (#1841)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 12:21:24 +03:00
Alexey KukanovandVasanth Tovinkere bd9dad9065 Stop enforcing ITT domains to be active (#1835)
Co-authored-by: Vasanth Tovinkere <vasanth.tovinkere@intel.com>
2025-09-05 15:40:52 +02:00
6575d93a46 Custom assertion handler (#1815)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-09-03 10:25:02 -05:00
0d0fe7cf14 Implementation of task_group dynamic dependencies (#1682)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2025-09-03 08:46:53 +03:00
Konstantin Boyarinov 712ad98443 Fix warnings in concurrent unordered containers and blocked range test (#1831) 2025-09-01 13:30:36 +03:00
dependabot[bot] f946f24cc4 Bump github/codeql-action from 3.29.9 to 3.29.11 (#1826)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-01 13:22:35 +03:00
Konstantin BoyarinovandAlexey Kukanov 575948b37c Add current_task_ptr entry point (#1821)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-08-27 19:21:31 +03:00
Dmitri MokhovandAlexey Kukanov fcf40fc39f Custom assertion handler (#1808)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-08-26 19:03:12 -05:00
Dmitri Mokhov 33da759dec Adjust mismatching years in CONTRIBUTING.md (#1825) 2025-08-25 07:16:33 -05:00
dependabot[bot] c4f2d38b94 Bump github/codeql-action from 3.29.8 to 3.29.9 (#1819)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-19 19:49:08 +03:00
dependabot[bot] fa5dfe1738 Bump actions/checkout from 4.2.2 to 5.0.0 (#1820)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-19 19:48:50 +03:00
Alexey Kukanov 681b96ecad Send ITT task end notifications with less delay (#1806)
Do not postpone the notifications for more than just a few unsuccessful attempts to find a non-local task, in order to avoid skewed results in profiling tools.
2025-08-19 18:44:37 +02:00
Ilya Isaev 4e4fffed4f Improve task_arena interoperability with task_groups (#1784)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-08-18 10:35:26 +02:00
dependabot[bot] a83797042a Bump actions/download-artifact from 4.3.0 to 5.0.0 (#1813)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-14 18:11:08 +03:00
dependabot[bot] 0bf0c9a853 Bump github/codeql-action from 3.29.4 to 3.29.8 (#1814)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-14 18:10:50 +03:00
7276846834 Add implementation details information for task group dynamic dependencies (#1743)
Co-authored-by: Michael Voss <MichaelJ.Voss@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2025-08-12 21:26:18 +03:00
Ilya IsaevandAlexey Kukanov 6b0cb2b88e Refactor reference_vertex: improve lifetime tracking, add tests, move class into the library (#1785)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-08-11 13:24:21 +02:00
Olga Malysheva 4ba5c69de4 Correct names in the new samples README (#1804) 2025-08-07 16:39:22 +02:00
Federico Ficarelli 8652376147 Avoid nullptr member function call if key hasn't been found by hash_buffer_impl::find_element_ref_with_key (#1800) 2025-08-02 16:17:20 +02:00
Mike VossandAlexey Kukanov 9f3ae90ed2 Added wording for supported hardware platforms in CONTRIBUTING (#1797)
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-08-01 08:24:40 -05:00
Caleb Zulawski af49577753 Bazel: apply -mwaitpkg only to x86-64 (#1790) 2025-07-31 11:55:21 +02:00
dependabot[bot] 42381256ab Bump github/codeql-action from 3.29.2 to 3.29.4 (#1793)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-30 11:30:32 +03:00
42cafa567e Extended Semantics RFC for task_group dynamic dependencies (#1664)
Co-authored-by: Michael Voss <MichaelJ.Voss@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-07-25 14:17:24 +03:00
dependabot[bot] 45726ad1da Bump actions/checkout from 4.1.1 to 4.2.2 (#1773)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 13:13:35 +03:00
dependabot[bot] 0bab27645e Bump step-security/harden-runner from 2.12.1 to 2.13.0 (#1786)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 13:13:17 +03:00
Coleman ddd006ac0f Fix assertion failure when using ASAN (#1726) (#1782) 2025-07-21 11:42:39 +02:00
dependabot[bot] 792d312233 Bump github/codeql-action from 3.29.1 to 3.29.2 (#1774)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-10 17:32:56 +02:00
Olga Malysheva 61352ca814 Update version for the next release (#1776) 2025-07-10 11:43:44 +02:00
Konstantin Boyarinov 9a771aafb6 Fix duplicating keys in concurrent_hash_map (#1771) 2025-07-07 20:11:32 +03:00
StepSecurity Bot 042c05859c [StepSecurity] ci: Harden GitHub Actions (#1769)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2025-07-02 16:37:33 +02:00
StepSecurity Bot 78f8d9c982 [StepSecurity] ci: Harden GitHub Actions (#1756)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2025-07-02 15:16:53 +02:00
lmarz 65d46656f5 Only enable fcf-protection on x86 based processors (#1768) 2025-07-02 09:18:31 +02:00
dependabot[bot] a22fa7afed Bump github/codeql-action from 3.29.0 to 3.29.1 (#1766)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 14:56:36 +02:00
Alexandra e0376a760e Release notes and System Requirements for oneTBB 2022.2 (#1765) 2025-06-30 15:31:48 +02:00
Alexandra 8acdf22f9e Update layout.html (#1763) 2025-06-25 18:38:59 +02:00
Jessica Marz e1f9047a83 updating documentation footer (#1748) 2025-06-25 16:08:32 +02:00
Alexandra 4846d563d1 Update layout.html (#1761) 2025-06-25 16:05:30 +02:00
ambbox 38d23f2394 concurrent_hash_map.rst - remove →erase (#1755) 2025-06-16 19:09:59 +03:00
dependabot[bot] ec7f5f3438 Bump step-security/harden-runner from 2.12.0 to 2.12.1 (#1753)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 11:46:41 +02:00
dependabot[bot] b6ac4d0e8a Bump github/codeql-action from 3.24.10 to 3.29.0 (#1754)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-16 10:23:20 +02:00
StepSecurity BotandOlga Malysheva ed2b49da48 [StepSecurity] ci: Harden GitHub Actions (#1736)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
Co-authored-by: Olga Malysheva <olga.malysheva@intel.com>
2025-06-13 10:07:18 +02:00
Olga Malysheva adb0a81b7f Add Coverity Windows job (#1751) 2025-06-12 18:14:42 +02:00
Alexandra 54f3611e12 Update README.md (#1750) 2025-06-06 15:02:22 +02:00
Alexandra bebc0cdbd2 Docs: HWLOC linked with libtbbbind (#1747) 2025-06-06 13:05:41 +02:00
Alexandra 10175ea047 Doc clean-up (#1708) 2025-06-03 17:06:49 +02:00
Jimmy Wei 0f6f87d1ad Migrate oneTBB samples from oneAPI-samples (#1730) 2025-06-03 14:07:21 +03:00
Olga Malysheva 65f1633ff4 Replace windows-2019 (deprecated) runner with windows-11-arm (#1746) 2025-06-02 16:42:30 +02:00
dependabot[bot] 5fa5d2f19e Bump ossf/scorecard-action from 2.4.1 to 2.4.2 (#1744)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 11:50:02 +02:00
Dmitri Mokhov 2a766ddb13 Add a forward declaration to avoid a compilation error in GCC ≤ 7 (#1742) 2025-05-28 15:10:11 -05:00
Aleksei Fedotov 051fd44c11 Extend test dynamic link (#1724) 2025-05-27 12:19:51 +02:00
Mike VossandKonstantin Boyarinov d304712beb Fix for overwrite_node to continue_node accounting (#1729)
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-05-22 10:43:45 -05:00
Aleksei FedotovandAlexandra e3ab04b078 Extend documentation wrt mixing with other threading packages (#1702)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2025-05-21 18:30:42 +02:00
Łukasz Plewa 326ab8f617 fix deadlock during initialization between vtune and tbbmalloc_proxy 2025-05-20 15:10:54 +02:00
Dmitri Mokhov e60bce120d Prevent copying of scoped_parallel_phase (#1731) 2025-05-15 22:42:17 -05:00
Dmitri Mokhov 803ad72649 Add an assertion in post coroutine-resume cleanup (#1728) 2025-05-14 13:35:25 -05:00
Mike Voss 982d9cb27f RFC for experimental support for type-specified message keys for join_node (#1704) 2025-05-12 13:05:25 -05:00
Mike VossandAleksei Fedotov 38f44f2ca7 Added RFC for Flow Graph Helper Functions (#1648)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-05-09 14:16:47 -05:00
Ilya Isaev e1caa5f5a7 Fix deprecation warning about <ciso646> header (#1725)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-05-07 15:54:05 +02:00
Ilya Isaev e0edf7a653 Reduce execution time of test_parallel_phase (#1723)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-05-06 10:42:31 +02:00
Olga Malysheva 7dfe7e744a Update compiler and linker options (#1719) 2025-04-30 21:29:20 +02:00
Aleksei Fedotov 2df02d2ac7 Fix various issues with build on Windows (#1720) 2025-04-29 21:07:58 +02:00
Aleksei Fedotov 61cfd830d4 Fix link to oneTBB Specification (#1718) 2025-04-29 13:58:53 +02:00
sarathnanduandsarathnandu c6c393777f Fix address sanitizer failures in tbb malloc (#1650)
Co-authored-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
2025-04-28 10:25:41 -05:00
Olga Malysheva a869ca2c33 Replace CPATH with C_INCLUDE_PATH and CPLUS_INCLUDE_PATH (#1710) 2025-04-25 21:18:02 +02:00
Olga Malysheva e28b8840b3 Add ubuntu-arm clang configuration (#1701) 2025-04-25 21:15:41 +02:00
Konstantin Boyarinov dceb92191f Fix copyright for Natvis file (#1715) 2025-04-25 16:00:24 +03:00
Konstantin Boyarinov b56dab688b Add Natvis file for TBB contianers (#1711) 2025-04-24 18:41:32 +03:00
John Ericson dedade160c Fix build errors on MinGW and FreeBSD (#1696) 2025-04-24 10:00:39 +02:00
Konstantin Boyarinov 61fd1fdf23 Disable scalable memory pools from test_tbb_header when _CRTDBG_MAP_ALLOC is defined (#1712) 2025-04-22 19:21:05 +03:00
dependabot[bot] 08ab3e5c06 Bump step-security/harden-runner from 2.11.1 to 2.12.0 in /.github/workflows (#1713)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-22 13:45:39 +02:00
Dmitri Mokhov 09b3703530 Make link options portable across compilers on Windows (#1705) 2025-04-15 13:34:35 -05:00
Olga MalyshevaandAlexandra 704ca611c4 Improve documentation (#1676)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2025-04-09 16:57:36 +02:00
Alexey Kukanov 8682bc9e66 [RFC] API to simplify creation of task arenas constrained to NUMA nodes (#1679) 2025-04-09 12:30:55 +02:00
Ilya Isaev 3dfecb5d1a Tests: fix uninitialized variables in copy_counting_object (#1642)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-04-08 09:09:55 +02:00
dependabot[bot] 814986f20e Bump step-security/harden-runner from 2.11.0 to 2.11.1 (#1697)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 13:53:47 +02:00
Vertexwahn 45c247870f Bazel support: Bump platform dependency (#1694) 2025-04-07 10:28:34 +02:00
Dmitri Mokhov f528a583cb Add copyright headers to new benchmarking scripts (#1692) 2025-04-01 09:23:11 -05:00
Dmitri Mokhov 31275c3f3a Correct Intel compiler version check in test_allocators.cpp (#1693) 2025-04-01 09:22:50 -05:00
Olga Malysheva a0be99678e Correct Intel compiler version check in CMakeLists (#1691) 2025-04-01 12:31:09 +02:00
Olga Malysheva e4fafed1cb Update version to 2022.2.0 for the next release (#1689) 2025-04-01 10:16:16 +02:00
Alexey Kukanov 0217e03ec1 Consider task_arena and task_group combination in detail (#1662) 2025-03-27 10:11:55 -05:00
Alexandra 0881802eeb Update RELEASE_NOTES.md and System Requirements for oneTBB 2022.1 (#1674) 2025-03-27 11:57:53 +01:00
Marc PaternoandKyle Knoepfel f3883b3666 [rfc] Resource-limited Nodes (#1677)
* Limited-resource RFC.

* Add to introduction

* Add question about constrained template use

* More work on introduction

* Primarily whitespace cleanup.

* Standardize thread-(un)safe

* Add blurb on C++20 support

* Updates to serialization RFC

* Incomplete version of sequence diagram

* Expand on limited resources

* Update README.md

* Update image

* Update README.md

* Minor updates

* Add performance analysis to README

* Whitespace cleanup

* Adjust heading levels

* Minor edits to text

* Adjust levels one more time

* Final editing pass before PR

* Remove unused plantuml files

* Adjust PR based on Mike's and Konstantin's suggestions/questions

* Adjust GitHub markdown

* Adjust GitHub markdown...again

* Update proposal based on @akukanov's suggestion

* Include graph diagram of analyzed workflow

* Use png instead

* Show graph with limiters

---------

Co-authored-by: Kyle Knoepfel <knoepfel@fnal.gov>
2025-03-25 18:52:50 -05:00
Dmitrii Golovanov 6c0fb2024a examples: build targets for benchmarking (#1678)
* examples: common: add_benchmark_target macro

New `add_benchmark_target` macro to use it with benchmark targets where post-execution data transformation is needed to summarize results, convert output to .csv files, etc. This feature requires `gawk` utility installed.

* examples: Tachyon, Primes, Sudoku: Add benchmark data post-processing

Add two new build targets to the Tachyon, Primes, and Sudoku examples to execute them for benchmarking with suggested parameters and optional .csv report file.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-03-25 18:04:14 -05:00
Olga Malysheva 39d0606b03 Add more hardening flags to library build (#1680) 2025-03-24 18:51:45 +01:00
Aleksei Fedotov 621af05d94 Allow loading dependencies by name (#1594)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2025-03-21 10:31:36 +01:00
Oleg Butakov 34e7495b16 Fix compilation on macOS with GCC (#1603) 2025-03-20 14:09:46 +01:00
Olga Malysheva ed141f3130 Replace ubuntu version in Documentation build CI job (#1675) 2025-03-12 12:32:32 +01:00
Dmitrii Golovanov 280e32f887 Example Benchmarks: calculate relative error on repeats (#1669)
* Move measurements class to measurements.hpp

Move class `measurements` from utility.hpp to its own file
measurements.hpp to simplify its use at example applications
eliminating duplicate declarations on include.
Adjust `seismic` example accordingly.

* examples: Extend class 'measurements'

Extend class `measurements`:
 * keep initial number of iterations.
 * stop() to return duration from the last start().

Add optional prefix and suffix at utility::report_relative_error().

* examples: tachyon: Add relative error estimation

Extend Tachyon example with additional option to execute
rendering several times and calculate relative error to
estimate rendering performance reliability.

* examples: primes: Add relative error estimation

Extend the Primes example `n-of-repeats` execution mode to
calculate relative error for each of the parallel threads
execution block (`n-of-threads`), so it is now possible to
measure their performance reliability.

* examples: sudoku: Add repeats and relative error

Extend Sudoku example with additional option to repeat solution
several times and calculate relative error to estimate
performance reliability.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-03-07 17:30:59 -06:00
Dmitrii Golovanov 7b10f20ab6 Fix cmake error on in-source build (#1670)
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-03-07 17:53:47 +02:00
2b39fda900 Add documentation for blocked_nd_range CTAD (#1641)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2025-03-06 22:08:08 +02:00
e02bdf20e7 Add documentation for parallel_phase feature (#1646)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-03-06 17:59:51 +01:00
Dmitri MokhovandAlexandra 35b9fe6da9 Add info about TBBBind and custom allocators to known limitations (#1666)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2025-03-06 08:43:37 -06:00
Olga Malysheva 6e78ddb76c Update test matrix, etc. (#1661)
* Update test matrix
* Update ubuntu runner for non-testing jobs as well
* Use common version of clang-format
* Fix typos found by codespell
* Configure codespell
* Disable formatting on a piece of code
2025-03-05 15:01:51 +01:00
Ilya IsaevandAlexandra d784b62819 Add info about conflict between Release and Debug TBB to Known Limitations (#1663)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2025-03-05 10:58:06 +01:00
Ilya IsaevandAleksei Fedotov 196cbe5ae8 Link tbbbind with static HWLOC instead of HWLOC 1.11 (#1631)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-03-04 10:05:06 +01:00
Alexandra 15b86bd1e2 Update docs with new paths (#1667) 2025-03-04 10:01:21 +01:00
Dmitrii Golovanov a0007251a7 Fix underflow at concurrent_hash_map (#1665)
Fix underflow at concurrent_hash_map::clear() to make Coverity scan
happy.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2025-03-03 15:48:48 -06:00
fa23dd3141 [RFC] task_group_dynamic_dependencies (#1469)
* Removed deprecated as cause for archive

* Added task_group_dynamic_dependencies RFC

* Addressed several comments on RFC

* Updated add_dependency figure

* Updated naming in task_group_dynamic_dependencies RFC and added more details

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Response to reviews

* Additional wording changes for dynamic tasks RFC

* Apply suggestions from code review

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Apply suggestions from code review

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Apply suggestions from code review

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* Changes to address reviews

* Addressed API comments for dynamic task API RFC

* Clarified what a valid task_handle can represent

* Apply suggestions from code review

Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>

* Apply comments & changes to the task group dependencies RFC (#1637)

* Remove concrete proposals from the RFC

* Apply review comments

* Update rfcs/proposed/task_group_dynamic_dependencies/README.md

* Apply review comments

---------

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-02-28 11:44:22 -06:00
Alexandra c71e06df83 Doc syntax fixes (#1660) 2025-02-28 17:03:37 +01:00
Olga Malysheva 2bfb15c32f Ignore TBB_FILE_TRIM for ICC (#1658) 2025-02-27 20:19:29 +01:00
Konstantin Boyarinov b58a15d2a1 Add missed headers to tbb.h (#1651) 2025-02-27 13:26:25 +02:00
Konstantin Boyarinov 8475f7e187 Update the list of maintainers (#1657) 2025-02-27 13:25:46 +02:00
Alexandra af1a128a93 Doc fixes (#1647) 2025-02-24 14:28:11 +01:00
Alexey Kukanov e49b67f757 Initial RFC for the task arena waiting functionality (#1617) 2025-02-24 14:00:31 +01:00
dependabot[bot]andKonstantin Boyarinov 9158f68080 Bump ossf/scorecard-action from 2.4.0 to 2.4.1 (#1649)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2025-02-24 12:23:23 +02:00
aacabd0277 Updated RFCs process description to align with oneDPL (#1612)
* Updated RFCs process description to align with oneDPL

* Update rfcs/README.md

Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>

* Update rfcs/README.md

Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>

* Response to reviews

* Update rfcs/README.md

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>

* Addressed review feedback

---------

Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-02-21 09:49:09 -06:00
Mike VossandDmitri Mokhov a44ca5a27e Added VERSIONING.md (#1640)
* Added Versioning Policies

* Update VERSIONING.md

Fixed subtitle based on review

* Update VERSIONING.md

Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>

* Update VERSIONING.md

---------

Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2025-02-19 14:05:07 -06:00
dependabot[bot] c712c1ad99 Bump step-security/harden-runner from 2.10.4 to 2.11.0 (#1635)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.10.4 to 2.11.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/v2.10.4...v2.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 11:12:12 +02:00
Bora YalçınerandBora Yalciner b21eebe723 Fix legacy *.lib files not obeying CMAKE_INSTALL_LIBDIR variable. (#1613)
Co-authored-by: Bora Yalciner <yalcinerbora@outlook.com>
2025-02-12 15:01:21 -06:00
Konstantin Boyarinov d68d40b2e0 Cleanup preview macros (#1632) 2025-02-12 12:37:30 +02:00
Konstantin Boyarinov 45c2298727 Add CI workflow for testing documentation examples (#1629) 2025-02-11 16:37:25 +02:00
moritz-h d3ad09cd7f Fix build with non-english locale (#1606) 2025-02-07 09:15:06 +01:00
Dmitri Mokhov b92627be07 Suppress Intel Compiler debug iterator vectorization warning in test_openmp.cpp (#1630) 2025-02-06 08:58:20 -06:00
Konstantin Boyarinov fa5ed8e81c Suppress Intel Compiler deprecation warning for STL in test_allocators.cpp (#1626) 2025-02-05 16:01:25 +02:00
Ilya IsaevandAleksei Fedotov 1684f054f6 Ignore system-wide installed HWLOC for test/conformance_arena_constraints (#1624)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2025-01-31 17:53:54 +01:00
Ilya Isaev 79b5d689ec Stabilize test_parallel_phase (#1623)
Use task_arena::enqueue instead of parallel_for to reduce probability of missed wakeup

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2025-01-31 17:53:07 +01:00
Konstantin Boyarinov 409280bae7 Fix C++20 macro in parallel_for_each + fix concepts macro definition (#1611) 2025-01-31 17:32:54 +02:00
Dmitri Mokhov e653e16216 Update build instructions for WASM (#1622)
Emscripten uses static linking, so we should explicitly request a static TBB library instead of

* explicitly asking for shared (current instructions)
* using the default, i.e., shared

Both of the above get overridden with multiple warnings.
2025-01-30 11:10:19 -06:00
Olga Malysheva 8a14e3cb89 /d1trimfile option is not supported by ClangCL (#1620) 2025-01-30 17:26:53 +01:00
Konstantin Boyarinov c02c2d28da Change ONETBB_SPEC_VERSION macro to align with the latest oneAPI spec (#1618) 2025-01-30 14:23:37 +02:00
Dmitri Mokhov 3c85ad7766 Fix UBSan issue (#1615)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2025-01-28 08:26:53 -06:00
Konstantin BoyarinovandRuslan Arutyunyan 9d45787238 Add explicit deduction guides for blocked_nd_range (#1525)
* Enable CTAD for blocked_rangeNd since C++17

* Fix constraits test failure

* Extend implementation with tests and explicit deduction guide

* Remove unnecessary helper function

* Simplify the deduction guide

* Add deduction guide for blocked_range type

* Enable CTAD for blocked_rangeNd since C++17

* Fix constraits test failure

* Fix merging issue

* Add new deduction guides and test

* Update copyright years

* Update copyright years

* Save progress

* Apply review comments + introduce preview macros

* Fix fancy value

* Add single C array support

---------

Co-authored-by: Ruslan Arutyunyan <ruslan.arutyunyan@intel.com>
2025-01-24 15:23:59 -06:00
Konstantin Boyarinov d4b5ee58cd Add RFC for CTAD in blocked_nd_range (#1607)
* Add CTAD RFC

* Fix examples

* Add information about the braced-init-list limitation

* Retarget the RFC to experimental

* Add exit criterias + cleanup

* Add one more limitation

* Add link
2025-01-24 15:21:31 -06:00
a9fcf49775 Add reference implementation for parallel_phase feature (#1570)
Implement parallel_phase API proposed in RFC, add new entry points to the library, move the RFC to the experimental stage. 

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
2025-01-24 18:35:51 +01:00
Vladislav Shchapov 0f287a7bc6 Enable Coverity Scan only on uxlfoundation/oneTBB repo (#1589)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-24 18:02:20 +01:00
Mike Voss 37f6cb92b7 [RFC] Added numa_support rfc (#1535)
With sub-RFC about increased NUMA availability.
2025-01-24 17:15:50 +01:00
Konstantin BoyarinovandIlya Isaev 0d73df4f49 Fix concurrent_bounding_queue capacity on copy, move and swap operations (#1609)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2025-01-21 16:01:37 +02:00
Olga Malysheva 8dea30c377 Ignore TBB_FILE_TRIM option for Intel compiler (#1610)
* TBB_FILE_TRIM is not supported with Intel compiler on Windows
2025-01-21 12:18:14 +01:00
dependabot[bot] f8d1bf0362 Bump step-security/harden-runner from 2.10.3 to 2.10.4 (#1608)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.10.3 to 2.10.4.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/v2.10.3...v2.10.4)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 11:12:54 +02:00
Olga Malysheva e589dc0b50 Update version to 2022.1.0 for the next release. (#1605) 2025-01-15 17:45:26 +01:00
d62834b13e Fix the allocator for Flow Graph critical tasks creating (#1596)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2025-01-15 13:41:53 +02:00
Vladislav Shchapov acd1e736ed CTest: do not run oneTBB tests in parallel (#1590)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-15 09:57:43 +01:00
Mike VossandDmitri Mokhov ba984824a2 Remove non-ASCII characters in doctest strings (#1602)
* Fixed incorrect C in doctest string

* Fixed incorrect K in doctest string

---------

Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2025-01-14 16:27:03 -06:00
Vladislav Shchapov f0985b145f Fix deprecation warning: Compatibility with CMake < 3.10 will be removed from a future version of CMake. (#1585)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2025-01-14 17:35:58 +01:00
Ruslan ArutyunyanandBoyarinov, Konstantin b1c534bb9d Enable CTAD for blocked_rangeNd since C++17 (#1524)
Co-authored-by: Boyarinov, Konstantin <konstantin.boyarinov@intel.com>
2025-01-14 13:50:41 +02:00
dependabot[bot]andBoyarinov, Konstantin edad47b823 Bump step-security/harden-runner from 2.10.2 to 2.10.3 (#1599)
* Bump step-security/harden-runner from 2.10.2 to 2.10.3

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Boyarinov, Konstantin <konstantin.boyarinov@intel.com>
2025-01-14 13:36:34 +02:00
Mike Voss ef539f9e24 Update CODEOWNERS (#1597) 2025-01-10 16:28:39 -05:00
Ilya Isaev 8659619fbd Fallback to GetThreadGroupAffinity if GetNativeSystemInfo reports wrongly (#1587)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-12-20 10:41:59 +01:00
Olga Malysheva 503fdb2e31 Add Coverity scan (#1455)
* Add Coverity scan workflow and status badge
2024-12-18 16:44:53 +01:00
Ilya Isaev d6c0dfa521 Add option to enable control flow guard during compilation (#1586)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-12-18 09:19:45 +01:00
Ash Vardanian 4719ac1d90 Avoid -Wstringop-overflow in GCC 14 (#1583) 2024-12-12 16:04:18 +02:00
Ilya IsaevandFedotov, Aleksei 7a60b70036 Fix CPU binding on HCC Windows systems (#1575)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2024-12-10 18:16:23 +01:00
Aleksei FedotovandMike Voss 77478a1fc3 RFC to change dependency loading process (#1564)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2024-12-10 14:54:24 +01:00
dd27a25bdf [RFC] Propose parallel phase API extension for task_arena to warm-up/retain/release worker threads (#1522)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2024-12-09 17:38:03 +01:00
Olga Malysheva 9b843adfbb Replace deprecated macos-12 environment with macos-14 and macos-15 (#1578) 2024-12-09 12:59:28 +01:00
Kursat AktasandMike Voss bd689b5a7e Introducing oneTBB Guru on Gurubase.io (#1566)
Signed-off-by: Kursat Aktas <kursat.ce@gmail.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2024-12-05 13:56:48 -06:00
Olga Malysheva 90b0f18297 Fix broken links after migration to uxlfoundation org. (#1577) 2024-12-05 16:49:25 +01:00
FantasqueX db883d1d0f Improve code readability in CMake integration section (#1574) 2024-12-03 12:16:06 +01:00
snadampal d3b0a80d02 Bazel: fix build issue on arm64 linux platform (#1571) 2024-11-29 09:17:51 +01:00
Alexey KukanovandAlexandra 0d377cc8ec Extend the documentation with more information about multidimensional ranges (#1569)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-11-28 16:25:24 +01:00
bef1519a42 Introduce MAINTAINERS.md (#1560)
---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-11-25 12:22:07 +00:00
Ilya Isaev bd291eb0d1 Fix module show when using Lmod (#1567) 2024-11-22 10:31:52 +01:00
dependabot[bot] 0d545e2865 Bump step-security/harden-runner in /.github/workflows (#1565) 2024-11-19 13:57:59 +00:00
Olga Malysheva f5a5f79a33 Adjust labeler config file (#1563)
* Adjust labeler config file
* Fix labeler workflow
2024-11-18 15:16:20 +01:00
d1d43adf6a Move blocked_nd_range out of preview (#1449)
---------

Signed-off-by: Tobias Weinzierl <tobias.weinzierl@durham.ac.uk>
Co-authored-by: Johannes Bockhorst <johannesbockhorst2@gmail.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-11-07 10:29:36 +00:00
dependabot[bot] ae2b801c3f Bump github/issue-labeler from 3.2 to 3.4 (#1551) 2024-11-06 10:59:13 +00:00
dependabot[bot] eae64c1c41 Bump actions/download-artifact from 2 to 4 (#1549) 2024-11-06 10:57:24 +00:00
dependabot[bot] 9b5ca7493c Bump step-security/harden-runner from 2.6.1 to 2.10.1 (#1550) 2024-11-06 10:54:55 +00:00
dependabot[bot] 3874ffd4fb Bump actions/labeler from 4 to 5 (#1548) 2024-11-06 10:52:45 +00:00
dependabot[bot] afad98a166 Bump ossf/scorecard-action from 2.3.1 to 2.4.0 (#1547) 2024-11-06 10:51:09 +00:00
Olga Malysheva 22a5be7095 Add dependabot.yml to enable automatic check for GitHub actions version update (#1546) 2024-11-05 15:08:35 +01:00
Aleksei Fedotov 63a2a4dae3 Fix race in concurrent_vector::grow_by() (#1532)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2024-11-04 15:59:46 +01:00
sarathnanduandAleksei Fedotov 73ccfb5ff3 Added a utility class for Relative Error compute. (#1446)
* Add a utility class measurements for relative error analysis.

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2024-11-04 08:10:16 -06:00
Ilya Isaev 9c9ace2686 Fix flow_graph tests build when compiling with GCC 13.3 (#1543)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-11-01 09:52:18 +00:00
Olga Malysheva bd15be276b Update upload-artifact to v4 (#1541) 2024-10-31 14:49:14 +01:00
Alexandra 86c06983bf Release Notes for 2022.0 (#1537)
* Release Notes for 2022.0

* Update RELEASE_NOTES.md
2024-10-31 12:42:28 +01:00
Dmitri Mokhov 948f0bbd4c Fix maximum concurrency on Windows with NUMA (#1538)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2024-10-25 09:42:08 -05:00
Ilya Isaev 377a91431e Remove sync-labels property from issue_labeler (#1534) 2024-10-23 17:07:47 +02:00
Brad Smith 42b833fe80 Fix futex support on OpenBSD (#1499)
OpenBSD no longer supports direct syscalls.
2024-10-15 12:58:21 +01:00
Ilya Isaev 94bee9c86b Fix constraints_variety set traverse, extend constraints test cases (#1530)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-10-15 13:44:41 +02:00
Alexandra 26d7f29349 Doc update for oneTBB 2022.0 (#1515) 2024-10-09 18:12:28 +02:00
bongkyu7-kim 9d85bf3b4e Fix get stack base in linux (#1485)
In case of pthread_attr_getstack() returns np_stack_size = 1MB,
- calculated stack_base = stack_limit + stack_size(default: 4MB)
- real stack_base = stack_limit + np_stack_size(1MB)
stack_base is wrong because calculated with 4MB stack size.

Due to this wrong stack_base, task_dispatcher::can_steal() can be always false.
It causes abnormal long loop in task_dispatcher::receive_or_steal_task().

Correct this problem using np_stack_size instead of stack_size.

Signed-off-by: Bongkyu Kim <bongkyu7.kim@samsung.com>
2024-10-07 11:10:25 +02:00
Konstantin Boyarinov af8d95c5f7 Add try_put_and_wait documentation (#1514) 2024-10-02 16:46:47 +03:00
2a7e0dbe46 [RFCs] Add rfcs directory (#1464)
* Add rfcs directory

---------

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2024-09-26 09:02:45 -05:00
Vladislav Shchapov 4b02f628ae Use GCC visibility attributes on Unix (#1114)
* To allow compiling with -fvisibility=hidden flag, GCC visibility attributes (with value "default") should be set.
* Enforce exporting unsafe_wait symbols on MacOS

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-09-24 16:39:57 +02:00
Pavel Kumbrasev c881143c53 Remove email from README (#1509) 2024-09-23 16:43:50 +01:00
Fang XuandAlexandra 498a0c7e96 Add TBB_FILE_TRIM option (#1401)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-09-19 15:01:02 +02:00
Alexandra a9d98815ee Update conf.py (#1511) 2024-09-12 17:32:07 +02:00
Alexandra 6895c0defc Fix rst (#1502) 2024-09-12 17:28:33 +02:00
Pavel Kumbrasev 6915673035 Fix race on reference_vertex dtor (#1506)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-09-05 11:33:53 +01:00
Łukasz Plewa 8152ba465a Fix coverity issue in the alignToBin (#1492)
Those values should be always >=0 but coverity do not know it.
Assert should fix it.
2024-09-03 17:16:14 +02:00
Łukasz Plewa 2d5b10f2d4 Fix coverity issue in block::initEmptyBlock (#1491)
getObjectSize should not return values bigger then 2^16-1.
We are assigning it's return value, which is 32 bit to 16 bit one,
so it is good to assert it anyway.
2024-09-03 17:14:50 +02:00
Łukasz Plewa bca0235663 Fix coverity issue in BitMaskMax (#1490)
It should never happen but coverity do not know it.
Assert should enough here
2024-09-03 17:14:03 +02:00
Konstantin Boyarinov 6f27d0dca6 Remove unused prio_push declaration (#1503) 2024-09-03 18:11:12 +03:00
Konstantin Boyarinov fe3c895752 Improve try_put_and_wait coverage (#1501) 2024-09-02 14:51:22 +03:00
Konstantin Boyarinov d666d342a6 [try_put_and_wait] Remove unnecessary functions (#1497) 2024-08-28 17:41:38 +03:00
Pavel Kumbrasev 7dd2b9cd1f Add new test: check clean-up of per-thread vertex map (#1496)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-08-28 13:44:23 +01:00
Pavel Kumbrasev 95eae117bc Remove redundant methods from reference_vertex (#1494) 2024-08-28 10:32:20 +01:00
Łukasz Plewa 374c27dca6 fix coverity issue in tbbmalloc HugePagesStatus
page_size variable was set to -1024 if hugepages was not used, while
being unsigned type. It did not matter as it was not used, when
hugepages are not used, but it is better to set it just to 0.
2024-08-26 18:38:41 +02:00
aae7fa62d1 [try_put_and_wait] Add try_put_and_wait feature to oneTBB Flow Graph (#1463)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Mike Voss <michaelj.voss@intel.com>
2024-08-26 12:58:18 +03:00
Pavel Kumbrasev 5555985128 Add link flags for static linking with ICX libs (#1489)
---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-08-23 14:21:04 +01:00
Konstantin BoyarinovandValery Matskevich 85a948b3f0 Remove std::aligned_storage from unordered containers (#1486)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Valery Matskevich <generalretcher@gmail.com>
2024-08-22 16:14:36 +03:00
Ilya Isaev ad9e324a89 Make thread registration in local_wait_for_all (#1477)
local_wait_for_all function seems to be a common spot for both external and worker threads to perform thread registration. So, basically whole implementation is to simply call register_thread only on first thread enter to local_wait_for_all and unregister_thread on last thread exit.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-08-21 17:25:03 +02:00
Ilya Isaev 04be823227 Parse TBB_INTERFACE_VERSION to get minor binary version (#1483)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-08-21 12:14:10 +02:00
Brad Smith e85d3705e7 Set the extension correctly for OpenBSD (#1468) 2024-08-21 10:15:29 +02:00
sarathnandu 2543c7fca5 separate debug symbols into a dbg file (#1476)
* separate debug symbols into a separate .dbg file when TBB_LINUX_SEPARATE_DBG is set.
2024-08-20 11:06:37 -05:00
Łukasz Plewa 2d516c871b Fix tbb malloc proxy on 14.30.33807 (#1478)
In this version of the ucrtbase.dll, the assembly of the _msize
function has changed.

The first instruction of this function is a relative jump (0xE9)
followed by a 4-byte offset. This offset has changed, but we can
safely assume that 0xE9 followed by any offset value is correct,
especially since we have special handling for the 0xE9 instruction in
the InsertTrampoline() function.

The 0xCC is an INT 3 instruction, so it's a free space to use.
2024-08-16 13:06:20 +02:00
Olga Malysheva 7105e0a676 Update oneTBB version to 2022.0.0 for the next release (#1479) 2024-08-16 13:05:27 +02:00
Olga Malysheva d405245230 Fix documentation build in CI (#1480) 2024-08-16 13:04:51 +02:00
sarathnandu 182e8e70e2 Update README.md with TBB_FIND_PACKAGE variable info (#1471)
* Update README.md with TBB_FIND_PACKAGE variable info
2024-08-14 09:52:37 -05:00
Vladislav Shchapov 3f810456b9 Update actions/checkout@v2 to actions/checkout@v4 (#1474)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-08-14 10:28:01 +02:00
Vladislav Shchapov ce60d6b7f9 Suppress GCC 12.x-13.x warning: region of size 0 (#1470)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-08-07 12:20:06 +01:00
Konstantin Boyarinovandpavelkumbrasev 306c75f5e9 Flow Graph scalability improvements (#1348)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-08-01 13:07:49 +03:00
Pavel Kumbrasev fa237b90ce Improve parallel_for_each scalability (#1445)
---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-07-31 11:13:45 +01:00
Ilya Isaev 4d0dc6a224 Restrict HWLOC's interference with Windows process affninity (#1457)
On Windows systems with multiple processor groups, HWLOC x86 backend might interfere with process affinity mask leading applications trying to set process affinity mask to fail.

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-07-29 10:28:39 +02:00
Vladislav Shchapov 2360b48807 Fixed build on non-English locales (#1450)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-07-23 14:45:51 +02:00
Ilya Isaev fd3960d311 Use TBB_TCM_TESTING CMake flag to hint to testing suite about TCM presence (#1452)
Disable global_control and arena priorities related tests and test cases when using TCM.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-07-22 11:16:17 +02:00
sarathnandu 89674dd32f Update the CODEOWNERS list with owners for include headers. (#1431)
* Update the CODEOWNERS list with owners for include headers.
2024-07-19 11:46:53 -05:00
Olga Malysheva 87a922eaa8 Add CodeQL scan workflow (#1443)
* Add CodeQL scan workflow
2024-07-17 14:31:18 +02:00
Olga Malysheva 95a749c59f Add OSSF scorecard workflow (#1442)
* Add OSSF scorecard workflow
2024-07-17 14:30:15 +02:00
Richard Barnes a74fb75f43 throw() -> noexcept 2024-07-16 07:29:35 -07:00
1f52f5093e Reworked wait_contex approach + scalability improvement in task_group (#1345)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2024-07-09 14:24:40 +03:00
Alexandra bad4c42be4 Fix Specs links (#1439) 2024-07-03 11:01:59 +02:00
VertexwahnandAlexandra 78d0290476 Improve Bazel support (#1434)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-07-03 10:25:13 +02:00
Vladislav Shchapov 04fe9127cd Fix dangling pointer (#1430)
* Fix dangling pointer
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-06-28 18:47:38 +03:00
Alexandr-Konovalov cf9406ebe7 Correct targets in examples' README.md (#1424)
Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
2024-06-28 11:30:58 +02:00
Pavel Kumbrasev db334fc49b Fix conformance_global_control (#1421)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-06-26 14:09:01 +01:00
Pavel KumbrasevandIlya Isaev 718aaf84f0 Refactor set of soft_limit to fix a bug (#1418)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2024-06-25 14:03:06 +01:00
Pavel KumbrasevandAlexandra 55bf2b3341 Define communication channels (#1408)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-06-24 12:02:43 +01:00
Olivier Chafik 8a95c39c2a Don't compile -mrtm when building with GNU + Emscripten (#1391) 2024-06-24 12:36:36 +02:00
Pavel KumbrasevandAlexandra d6ade50c9b WASM improvements (#1395)
* Improve thread stack init
* Update WASM readme
---------
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-06-24 10:40:39 +01:00
Pavel Kumbrasev fc18ad2319 Improve robustness of leaked observer warning (#1410)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-06-21 15:22:16 -05:00
Pavel KumbrasevandAlexandra 34108490bd Introduce issue templates (#1400)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-06-20 08:26:33 +01:00
Olga Malysheva ca7f580146 Add OSSF scorecard and best practices badges to README (#1409)
* Add OSSF scorecard and best practices badges.
2024-06-18 12:43:00 +02:00
Konstantin Boyarinov fdf1fdb57d Fix concurrent unordered containers build on GCC14 (#1397) 2024-06-10 19:57:19 +03:00
Pavel Kumbrasev 882a6fe68c Correct CODEOWNERS file extension (#1396)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-06-10 15:00:35 +01:00
Olga Malysheva b57aab85b6 Add UXL identity to README (#1387) 2024-06-03 12:46:36 +02:00
Alexandra d8c53ce141 Remove sign-off instructions (#1388) 2024-05-29 16:26:42 +02:00
Konstantin BoyarinovandAlexandra 50d56cc679 [Doc] Add documentation for rvalue reduction (#1385)
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-05-24 16:25:55 +03:00
Olga Malysheva 471454d14c Add Code of Conduct. (#1358)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2024-05-16 15:04:39 +02:00
sarathnandu c4ec31c237 Adding CODEOWNERS.txt to identify lead maintainers. (#1370)
* Adding CODEOWNERS.txt to identify  lead maintainers.
2024-05-15 18:46:53 +05:30
Dmitri Mokhov 54353f7714 Add a comment explaining why initialize_allocate_handler() is not called in the current library implementation (#1380)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2024-05-13 14:46:45 -05:00
JhaShweta1 279d61ada1 Update README.md (#1381)
Removed duplicate command
2024-05-13 12:21:04 -05:00
JhaShweta1 2753b9a189 Document Installation/Build Process from release packages (#1369)
* Release package installation
2024-05-13 10:35:56 -05:00
Timmie Smith 762b8af7e2 Improve regex to handle warning about the Intel Classic Compiler deprecation (#1378) 2024-05-06 13:29:37 -05:00
Martijn CourteauxandAlexandra 377e6c3b17 Detect binutils version to enable/disable WAITPKG support (#1347)
Signed-off-by: Martijn Courteaux <courteauxmartijn@gmail.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-05-03 14:10:36 +02:00
Dmitri Mokhov 3cef80b261 Ensure test_partitioner reliability by waiting between repeats for threads to leave (#1373)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2024-05-02 09:09:12 -05:00
Valery Matskevich 2539ba6a67 Using default partitioner instead of auto where default should be used (#1327)
Signed-off-by: Valery Matskevich <generalretcher@gmail.com>
2024-04-29 22:35:44 -05:00
Dmitri Mokhov 0da79a8935 Remove unused JPEG reading functionality from the Tachyon example (#1360)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2024-04-25 11:32:42 -05:00
Pavel Kumbrasev c1a0e74470 Improve arena construction by applying constraint (#1151)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-04-25 15:24:46 +01:00
Olga Malysheva 9951bf0db8 Fix e-mail for Security reports (#1367)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2024-04-25 15:05:50 +02:00
Pavel Kumbrasev 3420fb92c4 Improve machine_pause on arm64 (#1368)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-04-25 13:51:32 +01:00
Dmitri Mokhov 92c8529ff4 Add task arena worker block time (#1352)
* Add `threading_control::is_any_other_client_active()` to verify if other arenas are requesting workers.
* Add hybrid CPU detection at initialization.
* On non-hybrid CPUs, make workers block for 1ms before leaving the arena, unless
  - more work becomes available in the arena (-> unblock and stay in the arena);
  - other arenas are requesting workers (-> unblock and leave the arena immediately).

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-04-24 16:50:56 -05:00
Alexandra 9501cd9dbd Update SECURITY.md (#1365) 2024-04-24 20:01:13 +02:00
Timmie Smith 4f913ce690 Updating contents to write permissions to allow commit to be created. (#1364) 2024-04-24 11:12:37 -05:00
sarathnanduandpavelkumbrasev 791701a8c6 Increase yields multiplier on APPLE platforms (#1356)
* Increase yields multiplier on APPLE platforms

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2024-04-24 21:23:27 +05:30
Olga MalyshevaandAlexandra ad9d6e3edc Update Security policy (#1359)
* Update Security policy

---------

Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2024-04-24 17:36:31 +02:00
Geert BleyenandIlya Isaev 39b4ff4adc CMake: Add Apple framework support (#1319)
Add cmake option TBB_BUILD_APPLE_FRAMEWORKS to build oneTBB as Apple Frameworks.
This is needed to be able to create iOS compatible app bundles which need to embed TBB as framework, as using dylibs is prohibited by Apple.

Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2024-04-24 15:35:15 +02:00
Timmie Smith a5c8624e96 Reintroduce restricted permissions for all jobs while providing pages with write access needed to deploy documentation. (#1362) 2024-04-24 07:28:12 -05:00
sarathnandu 483789879d Fix compilation error in mingw [-Werror=unused-value] (#1361) 2024-04-24 13:13:56 +05:30
Olga Malysheva 1abf0cecbd Update TPP file (#1357)
Update TPP file with actual 3rd party dependencies data.

Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2024-04-23 20:29:48 +02:00
Vladislav Shchapov 548b88a09a Add CI for static TBB build (#1350)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2024-04-22 15:44:59 +02:00
Vertexwahn 0f2f3e5b69 Improve Bazel support (#1342)
- Bump platforms to 0.0.9
- Remove different name in WORKSPACE.bazel file
- Add bazelized test_task test
2024-04-22 12:53:47 +02:00
Alexandra bd0f1f9514 Update doc build instructions (#1351) 2024-04-19 11:44:55 +02:00
Daniel Bashir 5155e9f78e Correct MyHashCompare example in concurrent_hash_map page (#1339)
Signed off by: Daniel Bashir <dbashir@hmc.edu>
2024-04-18 13:50:33 +03:00
Santiago Ospina De Los Ríos 4a87ca1cc5 Delay Сontrol variable initialization (#1346)
Initialize/destroy Controls during acquire/release resources stage to avoid unexpected problems with global objects initialization order. 

Signed off by: Santiago Ospina De Los Ríos <sospinar@gmail.com>
2024-04-18 10:44:41 +01:00
Timmie Smith 26ee8abcc2 Reverting workflow permissions restriction to reenable pages job. (#1349) 2024-04-17 11:16:52 -05:00
meator d9034a4e2e pool.py: Fix invalid escape sequences (#1344)
* pool.py: Fix invalid escape sequences

Signed-off-by: meator <meator.dev@gmail.com>
2024-04-17 11:30:15 +02:00
Alexandra 224eca369a Release Notes 2021.12 (#1338)
* Update RELEASE_NOTES.md for 2021.12
2024-04-12 20:55:53 +02:00
Łukasz Plewa 84c859a5ea fix copyright (#1340)
PR #1230 was merged with invalid copyrights

Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
2024-04-04 14:12:47 -05:00
Łukasz Plewa b26552d26e fix copyright
Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
2024-04-02 17:23:23 +02:00
Jerry James fd4d06d307 Fix a strict aliasing violation
Signed-off-by: Jerry James <loganjerry@gmail.com>
2024-04-02 17:23:23 +02:00
JiaLing Zhang 78d0318fc2 LoongArch64 use 32 HUGE_PAGE_SIZE
Signed-off-by: JiaLing Zhang <zhangjialing@loongson.cn>
2024-04-02 15:17:33 +02:00
Ilya Isaev 3210a79406 Fix copyright years in GNU and Intel cmake files (#1333)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-03-26 17:11:32 +01:00
Julien Schueller 9e76c87c79 CMake: Set _FORTIFY_SOURCE once (#1273)
Signed-off-by: Julien Schueller <schueller@phimeca.com>
2024-03-26 15:11:02 +01:00
JhaShweta1 0d1787b991 Update ittnotify from v3.24.2 to v3.24.4 (#1326)
* Update ittnotify from v3.24.2 to v3.24.6
2024-03-19 14:45:18 -05:00
Dmitri Mokhov 5b10a8741c Exclude the CWD from the dependent DLL search (#1330)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2024-03-19 08:09:54 -05:00
Daniel Simon 8b87444d2c Require both TBB_FIND_PACKAGE and TBB_DIR for external TBB usage(#1324)
Currently TBB attempts a find package and excludes the entire build part of the CMake setup when *either* `TBB_FIND_PACKAGE` *or* `TBB_DIR` are defined. This is an issue when using `FetchContent` with `OVERRIDE_FIND_PACKAGE` as CMake declares `TBB_DIR` to equal `${CMAKE_BINARY_DIR}/CMakeFiles/pkgRedirects/`.
2024-03-14 12:31:27 +01:00
Krzysztof Filipek df7306cb1e Add CODEOWNERS file
Code owners are automatically requested for review when someone opens
a pull request that modifies code that they own. Code owners are
not automatically requested to review draft pull requests.

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2024-03-11 16:56:55 +01:00
Timmie Smith e2f1502126 Setting write access for pages deployment job. (#1325) 2024-03-11 12:51:30 +01:00
Olga Malysheva 9e401d119c Update library version to 2021.13.0 and copyright year for DLLs. (#1322)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2024-03-05 20:38:33 +01:00
Alexandr-Konovalov 244fba9d40 Fix deadlock in test_scheduler_mix (#1309)
After stealing, current arena must be taken into account while selecting
next arena to prevent deadlock. Arena index is passed explicitly for that.

Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
2024-02-27 09:52:37 +01:00
Timmie Smith 37d5a9fd49 Set minimum access permissions on all workflows (#1306)
* Adding read-only permissions to all jobs in the CI workflow to ensure minimum required access.
2024-02-26 16:21:03 -06:00
JhaShweta1 f0d4aba544 Omit tests that takes too long for emscripten (#1312)
* Omitting tests that takes too long in CI
2024-02-16 15:37:57 -06:00
Konstantin Boyarinov ae0696c64f Better rvalues support for parallel_reduce algorithm (#1307)
Signed-off-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2024-02-14 15:45:46 +02:00
Kenneth Assogba 7340a88088 Spelling error fix in count_strings.cpp: strunt -> struct (#1311) 2024-02-13 09:57:03 +01:00
Ilya IsaevandPavel Kumbrasev 627cac6dd0 Correct behavior on deactivated permit (#1308)
* Correct behavior on deactivated permit

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2024-02-05 20:31:26 +01:00
JhaShweta1 fabaaa6587 Flag to compile oneTBB without threads (#1303)
* compile WASM without pthread
2024-02-05 11:08:58 -06:00
Timmie Smith 144b184667 Adding read-only permission to all jobs in the CI flow to ensure minimum required access (#1300) 2024-01-23 14:52:52 -06:00
Alexandr-Konovalov 54a22a627c Add NOMINMAX before windows.h in enumerable_thread_specific.h (#1291)
Currently enumerable_thread_specific.h inclusion breaks std::min and
std::max usage due to macro spreading from windows.h.

Signed-off-by: Alexandr Konovalov <alexandr.konovalov@intel.com>
2024-01-22 10:58:56 -06:00
Kyle Knoepfel 4dfcb6d2e9 Fix typo (#1288) 2024-01-11 10:05:01 -06:00
Ilya Isaev 8c9814cfd4 Update copyright year in MODULE.bazel (#1289)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2024-01-09 17:04:01 +01:00
Vertexwahn c41d4782e4 Improve Bazel support (#1285)
Bump of Bazel version to 7.0.0
Add MODULE.bazel to support Bazel's new system of handling dependencies (bzlmod)
Remove .bazelrc (config of out-of-source build is not needed or a best practice)
2024-01-09 09:41:25 +01:00
Konstantin Boyarinov 3b9f9baef9 Fix parallel_for_each iterator tag dispatch for move iterators + fix stack overflow on Windows (#1276) 2023-12-13 16:21:59 +02:00
LE GARREC Vincent f4db1c8aba Fix flow graph reservation documentation (#1235)
Signed-off-by: LE GARREC Vincent <github@le-garrec.fr>
2023-12-13 15:19:06 +01:00
Alexandra f6b7cb1b5f Introduce SUPPORT.md (#1282) 2023-12-13 10:23:33 +01:00
Olga Malysheva 58653a3729 Set PKG_CONFIG_PATH in modulefiles (#1279)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2023-12-06 15:11:17 +01:00
JhaShweta1 8259efb347 emscriptem 3.1.45+ doesn't support mrtm and waitpkg (#1271)
WASM: build fails for Emscripten 3.1.45+
2023-11-27 10:28:07 -05:00
Alexandra f4629cc848 Update conf.py (#1272) 2023-11-22 19:14:49 +01:00
Alexandra a71747cd86 Update WASM documentation (#1207) 2023-11-20 13:03:54 +01:00
Alexandra d1c04c902b Update RELEASE_NOTES.md for 2021.11 (#1267)
* Update RELEASE_NOTES.md for 2021.11
2023-11-17 17:44:55 +01:00
Dmitri Mokhov f71c92ae4a Minor waiter code refactoring (#1262)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-11-16 08:14:19 -06:00
Konstantin Boyarinov de0a3a653b Fix parallel_for_each with C++20 iterators (#1250) 2023-11-14 13:16:21 +02:00
Liam Keegan 12ceae1213 Fix CMake "Threads::Threads target not found" issue for static builds (#1248)
- add `Threads` dependency to installed CMake config for static builds only
- based on #912 by @p12tic including reviewer comments from @ilya-lavrenov and @isaevil
- resolves #1145

Signed-off-by: Liam Keegan <liam@keegan.ch>
2023-11-10 09:08:42 +01:00
Alexandra c62b646850 Update Mixing_Two_Runtimes.rst (#1227) 2023-11-08 11:59:54 +01:00
Pavel Kumbrasev ab7f370cd1 Fix tests compilation on OpenBSD (#1246)
* Fix test_eh_thread on OpenBSD
* Disable test_malloc_compliance on OpenBSD
---------
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-11-08 09:11:51 +00:00
Brecht Sanders 7b8018f0bc Support Windows on ARM64 (aarch64) when building with MinGW-w64 (#1245) 2023-11-06 16:49:31 +01:00
Vladislav Shchapov f27eb147f1 CMake: add option TBB_INSTALL (#800)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-11-06 16:49:09 +01:00
Julien Schueller 4bb8938d04 CMake: Bump required version (#1237)
Bump cmake version to 3.5 to avoid this deprecation message:

CMake Deprecation Warning at CMakeLists.txt:15 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Signed-off-by: Julien Schueller <schueller@phimeca.com>
2023-11-06 10:20:39 +01:00
Olga Malysheva 9f59fcf432 Change location of headers and lib files in NuGet packages (#1241)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2023-10-26 11:13:45 +02:00
Dmitri Mokhov 3cd37a22c7 Upgrade oneTBB version to 2021.12 (#1238)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-10-24 08:07:16 -05:00
Alexandra d5a5a723ec Update INSTALL.md (#1239) 2023-10-24 13:42:50 +02:00
Jordan Cartwright d6b0e9d442 update the documentation runs-on config (#1234)
Signed-off-by: Jordan Cartwright <jordan.cartwright@intel.com>
2023-10-24 10:46:45 +02:00
bavirnen 6ae3df4c8f Use correct OpenMP compile flags for Intel LLVM compiler (#1232) 2023-10-20 16:58:02 +02:00
Martin Marinov bec5d998b1 Rename ENDL with TBB_ENDL to reduce the likehood of potential conflicts with application source code (#1220) 2023-10-19 13:25:26 +02:00
Ilya Isaev ddfc32d926 Show patch version in the version string (#1229)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-10-19 12:58:14 +02:00
Dmitri MokhovandAlexandra 8370742daa Add Pi sample (#1221)
* Add Pi sample

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2023-10-16 10:24:08 -05:00
Ilya Isaev 7b927dc4a8 Search libraries only in explicitly pointed locations (#1218)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-09-29 09:04:58 +02:00
GertyP fd1590c459 Fix msvc.cmake overwriting user TBB_COMMON_COMPILE_FLAGS values (#1217)
Most other /cmake/compilers/...cmake files preserve any user-supplied
flags. This change brings use of MSVC compile settings in to line with
the documented behaviour of TBB_COMMON_COMPILE_FLAGS in -
https://github.com/oneapi-src/oneTBB/blob/master/cmake/README.md#cmake-files

Signed-off-by: Dan Hawson <danhawson@gmail.com>
2023-09-27 11:42:47 +02:00
Elias Engelbert Plank 7eb68ae9d3 Fix compiler warning for missing virtual dtor (#1215)
This fixes issue #1210 by adding a default virtual destructor for tbb::detail::r1::control_storage.

Signed-off-by: Elias Engelbert Plank <plank.elias.engelbert@gmail.com>
2023-09-27 09:12:36 +02:00
Pavel KumbrasevandDmitri Mokhov 91ba7e7e19 Fix race in single task Fibonacci example (#1209)
* Enable multiple recycles
* Extend fibonacci with continuation recursion
* Bypass task to operator()() to remove extra synchronization complexities

---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-09-25 15:07:48 -05:00
Pavel Kumbrasev 11545bd606 Fix brief in test_fuzzing (#1206)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-09-18 12:09:06 +01:00
Ilya Lavrenov a9d76a1721 Allow pkg-config search for hwloc for cross-compilation (#1202) 2023-09-12 10:08:42 +02:00
Dmitri Mokhov e131071769 Fix/suppress new GCC 12/13 warnings (#1192)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-09-11 10:35:07 -05:00
Julien SchuellerandIlya Isaev 2a6bd1e198 CMake: -z linker flag is not supported on MinGW either (#1193)
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2023-09-11 12:26:41 +02:00
Ilya IsaevandKonstantin Boyarinov 546fe2736c Fix test_task crash/hang on RT Linux systems (#1201)
"Test priority inversion" test case manually increases threads' priority (including main thread) to test priority inversion problem but never restore it. That could lead to busy-waiting inside oneTBB on RT Linux kernels which is not expected. This patch restores previous priority after the test case completes.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2023-09-08 12:27:47 +02:00
Alexandra 229b63ee0a [DOC] Introduce new "Known Limitations" topic (#1178) 2023-09-08 12:04:27 +02:00
Alexandra 0b05d0f4ca [doc] MacOs Removal (#1186) 2023-09-08 11:46:34 +02:00
Dmitri Mokhov 35d2aedf98 Make test_implicit_linkage_on_windows portable across compilers (#1200)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-09-07 08:38:16 -05:00
Yuya Asano cb6cc0ec55 Fix inline literals in Edges.rst. (#1177)
* Fix inline literals in Edges.rst.

Signed-off-by: Yuya Asano <64895419+sukeya@users.noreply.github.com>
2023-09-04 09:43:01 +02:00
Ilya Isaev d0748d299f Remove code that is not used anymore (#1191)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-09-01 14:42:59 +02:00
Dmitri Mokhov 261551ed82 Add tag to brief description (#1190)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-08-30 12:01:22 -05:00
Dmitri Mokhov 48ba0d7acd Add fuzz testing (#1184)
* Add a CMake option: `TBB_FUZZ_TESTING` (default: off)
* Add a `test_fuzzing`, which uses libFuzzer to fuzz all the environment variables and launches `test_task` each time.

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-08-29 18:43:23 -05:00
Pavel Kumbrasev 7b022651e0 Fix thread request on arena::update_concurrency (#1188)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-08-29 15:34:33 +01:00
xiacunshunandcunshunxia 1ddebef8ac doctest: Fix compiler error of address will never be NULL (#1181)
Co-authored-by: cunshunxia <cunshunxia@tencent.com>
2023-08-28 09:36:16 +01:00
Ilya Isaev b2474bfc63 Correctly get fully qualified name if modulefile is a symlink (#1185)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-08-25 16:41:51 +02:00
Vertexwahn fa6605faf1 Fix _WIN32 define (#1183)
By accident, the define was called WIN32 - should be _WIN32.
The string #if _WIN32 can be found more than 100 times in this repo - #if WIN32 only one time.
It breaks the Bazel build of oneTBB on Windows (bazel build //...).
2023-08-25 09:08:39 +02:00
JhaShweta1 3f1ecfe509 copyright_failure: reverted back commit message (#1182)
* reverted back commit message
2023-08-24 17:50:49 -04:00
Pavel Kumbrasev d489c1f7a0 Extend Fibonacci (migration) example (#1173)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-08-24 09:25:03 +01:00
JhaShweta1 c4a799dff6 Spelling correction (#1179)
* codespell changes
2023-08-23 15:45:36 -04:00
Krzysztof Filipek 3b378356eb Add explicit methods to meet the "rule of zero/three/five"
Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-08-18 16:58:25 +02:00
Krzysztof Filipek c79ef1e5f4 Add missing methods to RecursiveMallocCallProtector class
This commit adds missing methods to meet "the rule of three".

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-08-18 16:58:25 +02:00
Krzysztof Filipek b40b034fa9 Add missing methods to scoped_lock class
This commit adds missing methods to meet "the rule of three".

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-08-18 16:58:25 +02:00
Krzysztof Filipek b9a0ab455c Add missing methods to ThreadId class
This commit adds missing methods to meet "the rule of three".

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-08-18 16:58:25 +02:00
Krzysztof Filipek 568a7e5822 Add missing methods to RegisterProcessShutdownNotification struct
This commit adds missing methods to meet "the rule of three".

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-08-18 16:58:25 +02:00
JhaShweta1 706ad8677f Update ittnotify to the latest version v3.24.2 (#1176)
* itt version update to v3.24.2
2023-08-18 08:44:43 -04:00
71e1bb8efc Integration of Thread composability manager (#1163)
Add TCM support in oneTBB. oneTBB can coordinate with Intel(R) OpenMP on CPU resources usage to avoid excessive oversubscription when both runtimes are used within a process.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-08-17 11:58:01 +01:00
Ilya IsaevandOlga Malysheva 5f1ae0dce3 Support multiple layout variations in Linux/Windows vars scripts, refactor modulefiles (#1157)
env/vars scripts now support different layouts (for example, bin/ or redist/ on Windows, lib/<arch> or lib<arch_suffix>/ on Linux). Also modulefiles now rely on lib/ and lib32/ for library path, not on lib/intel64/gcc4.8 or lib/ia32/gcc4.8

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Olga Malysheva <olga.malysheva@intel.com>
2023-08-17 12:57:54 +02:00
7cee22511f Enable WASM on oneTBB (#1006)
* WASM/emscripten on oneTBB
---------

Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2023-08-11 12:34:55 -04:00
Lukasz Dorau 4743eda21c Initialize uninitialized scalar field currTime
Initialize uninitialized scalar field currTime.
It fixes the Coverity issue #449478.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-08-11 11:23:41 +02:00
Lukasz Dorau 83e480199d Make lastAccessMiss a local variable
Make lastAccessMiss a local variable.
It fixes the Coverity issue #449482.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-08-10 18:23:25 +02:00
Lukasz Dorau 900b99bb43 Initialize uninitialized scalar field currCacheIdx
Initialize uninitialized scalar field currCacheIdx.
It fixes the Coverity issue #449484.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-08-10 17:18:30 +02:00
Lukasz Dorau 926c3783a5 Assert if a shift amount is negative
Shifting by a negative amount has an undefined behavior.
A shift amount must not be negative.

It fixes the Coverity issues: 449477 and 913889.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-08-10 17:08:19 +02:00
Pavel Kumbrasev ddc3bd0392 Close File before leave function (#1171)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-08-10 15:44:20 +01:00
Krzysztof Filipek 20514c0eb8 CI: Update issue-labeler and grand proper permissions
Issue labeler stops working due to GHA upgrade to newer Node:
https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-08-10 14:38:02 +02:00
Lukasz Dorau 4992457dc2 Verify size in alignToBin()
Size in alignToBin() must not be less than the StepFactor (8).

It fixes the Coverity issues: 449474 and 913880.

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-08-10 12:36:56 +02:00
JhaShweta1 691dd26b66 oneTBB: CI- example fgbzip2 linkage fail (icx, Win32) (#1166)
* Update CMakeLists.txt: Added FORCE:multiple for intelLLVM
2023-08-09 11:52:51 -04:00
Łukasz Plewa 32d5ec1f02 Add additional synchronization around *CachesCleanup function
This commit fixes the issue when test_malloc_pools TestFixedBufferPool
fails sporadically on test_malloc_pools.cpp:437

utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2,1) );

The main problem was that threads were not aware of cleanup operations
done by SoftCachesCleanup() and HardCachesCleanup() functions.
So while one thread was doing a cleanup, the second one
returns ENOMEM as it couldn't find any memory to allocate in the
backend (this test creates fixedSizePool)

The change adds additional flags and counters that indicate cleanup
operation is in progress, allowing the thread to wait for those
operations to complete before deciding if there is free memory to
allocate or not and return this information to the caller.

In the scenario reproduced by the test, memory for the allocation can
be reclaimed from the LOC. This operation happens in the
loc.cleanAll() or loc.regularCleanup functions called respectively, by
hardCachesCleanup() or softCachesCleanup() functions.
In those functions, free memory is removed from LOC and added to the
backend bin. Between those operations, other threads are unaware that
this memory block is free and returns ENOMEM to the user.

To fix this problem, this patch adds two flags to indicate that
cleanup (soft or hard) is in progress, and threads should wait before
returning NULL to the user.

But there was one more problem: backend::clean() function.
This function removes memory from the bins to try to release or
coalesce it. The problem is that other threads were not aware of
this operation. It causes a 'funny' situation when:

Thread 1: Performs HardCachescleanup function
Thread 2: wait "waitTillBlockReleased()"
Thread 1: Returns memory from LOC
Thread 2: exits waitTillBlockReleased() as it detected new memory in
backend
Thread 1: starts backend::clean() - removes memory from the bin to try
coalesce it
Thread 2: Fail memory allocation as there is no free block in
bins, and returns ENOMEM
Thread 1: Finish coalescing and return memory back to bins

To resolve this problem, this patch adds a counter which allows
threads to detect when clean operation is done so that the threads
will wait for the complition of there is no memory available.

Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
2023-08-07 12:13:38 +02:00
Łukasz Plewa 25c399f4de Refactor waitTillBlockReleased function
"for loop" without condition and without iterator is not a great
solution for code readability. For simple infinite loop "while loop" is
much more readable solution.

Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
2023-08-07 12:13:38 +02:00
Alexandra f5fb3c9153 Update CMake README.md (#1156) 2023-08-04 13:49:33 +02:00
Pavel Kumbrasev acc5bdfe1a Add shortcut for mutex.h and rw_mutex (#1158)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-08-03 12:59:53 +01:00
Ilya Isaev f9fd1bee10 Allow building and loading of TBBBind on macOS (#1132)
With this patch user may build TBBBind on macOS and be able to use tbb::info namespace to obtain high-level information about the system and limit task_arena accordingly (without actual CPU binding since such functionality is not supported on macOS via HWLOC).

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-08-03 11:01:54 +02:00
Pavel Kumbrasev 3e7d8e7f28 Add mutex.h and rw_mutex.h to oneapi/tbb.h (#1153)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-08-02 10:59:19 +01:00
Alexandra 45a99b4218 Update SYSTEM_REQUIREMENTS.md (#1154)
Align with 2021.10 System Requirements
2023-08-01 17:43:49 +02:00
Ilya Isaev 539cbb3e67 Remove unsupported -z switch while compiling on MacOS (#1150)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-07-27 17:04:09 +02:00
sarathnandu 7c79c824af Update Tpause constant for better performance on high core count system. (#1149)
* Update Tpause constant for better performance on high core count system.

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
2023-07-26 14:18:21 -05:00
Alexandra aff58fee2c Update Release Notes for oneTBB 2021.10 (#1146) 2023-07-24 17:25:39 +02:00
Ilya Isaev 37a89d47f2 Fix test_task_group compilation on GCC 12 (#1144)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-07-19 15:08:13 +02:00
Aleksei Fedotov 60a815be1d [TCM] Add important composable scenario (#96)
Nested parallelism use case where TBB outer loop has a relatively small amount of work comparing to the amount of OpenMP work on the nested level is of particular importance to the TCM project, since it exposes the main problem with oversubscription, which resolution justifies such projects as TCM.

This patch adds such a use case into synthetic set of TCM benchmarks.

Besides this, the patch also makes other small improvements to avoid type conversion issues and makes the OpenMP executor to not specifying the "num_threads" clause on the loop pragma if user did not specify the concurrency of the OpenMP executor explicitly.
2023-07-17 18:26:41 +02:00
Ilya IsaevandAleksei Fedotov 1db4972980 [TCM] Add constrained and perfect nesting use cases (#95)
Add two new microbenchmarks:
ubench_constrained.cpp - perfect nested microbenchmarks using NUMA constraints
ubench_perfect_nested - "perfect nesting" case

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-07-14 15:03:05 +02:00
Pavel KumbrasevandAleksei Fedotov d2504bd30f [TCM] Add TLS implementation for register/unregister (#94)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-07-11 16:23:49 +01:00
188981fa71 [TCM] Port previously implemented TCM microbenchmarks with some refactoring (#91)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-07-07 11:19:52 +02:00
Ilya Isaev 013495cdd8 [TCM] Fix Seismic compilation issues (#92)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-07-04 16:27:05 +01:00
Aleksei Fedotov a20bacda01 [TCM] Add seismic benchmark from oneTBB repository (#88)
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-07-03 10:22:16 +01:00
Dmitri Mokhov 88f73bbb48 Fix test_concurrent_queue failure with ICL19.0/VS2017 (#1141)
Prevent an incorrect optimization by ICL 19.0 (fixed in ICL 19.1) with VS 2017 stdlib with inline-level=1 (/Ob1) that resulted in premature object destruction inside `std::unordered_set`.

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-06-30 08:59:14 -05:00
Aleksei Fedotov faa41e328c [TCM] Do not overwrite request parameters when idle rigid gets negotiated (#89)
The OpenMP can adjust the number of threads when it re-activates the rigid concurrency permit after it was involuntary deactivated while being in IDLE state.
Therefore, TCM should try satisfying initially requested amount of resources as much as possible for such permits.
2023-06-28 14:36:59 +02:00
3f76ae94d0 [TCM] Order negotiation of resources (#87)
The patch puts an order on the resources redistribution. It starts by trying to satisfy the request with available resources. If these are not enough, then it takes back IDLE resources (even from rigid concurrency permits), and only after that negotiates resources from ACTIVE permits.

For non-rigid concurrency IDLE permits the negotiation happens until required amount of resources for these permits is still satisfied. If further negotiation is required, the permits are moved to INACTIVE state. The rigid concurrency permits in IDLE state are transferred to INACTIVE state without negotiation. Later on if such rigid-concurrency permit tries to activate, the TCM tries to match the amount of resources the permit was given before it was deactivated.

Besides that the patch also reveals a couple of issues with support of constrained requests and a data-race in `updated_permit` function, which have been fixed, corresponding regression tests were added.

The patch also allows automatic inference of the request parameters if a client did only automatic request initialization.

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2023-06-26 18:35:30 +02:00
Alexandra e813596ba3 Documentation for std::invoke (#1112) 2023-06-21 18:46:54 +02:00
87c2fdc129 Add new Fibonacci example built on Task API emulation (#1104)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-06-21 15:34:57 +01:00
Marian Klymov dc883a59b3 scalable_allocator.h: add missing include for namespace injection (#1137)
Signed-off-by: Marian Klymov <nekto1989@gmail.com>
2023-06-21 13:22:55 +01:00
Emmanuel Ferdman 7f0dc95ec5 FIX: Remove broken style.css reference from layout.html (#1115) 2023-06-21 12:07:52 +02:00
Alexandra 10e75e446e Update next_steps.rst (#1135) 2023-06-20 11:01:52 +02:00
Olga MalyshevaandDmitri Mokhov 89b2e0e316 Update outdated URLs in comments (#1129)
* Update outdated URLs in comments

Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
Co-authored-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-06-19 11:44:36 +02:00
c456844955 Refactor market into threading layer (#758)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-06-16 15:37:06 +01:00
Łukasz Plewa c7865c1be0 Fix deadlock in tbbmalloc raportFreeBlocks function (#1117)
trylockblock() locks mutex in the current element and mutex in right
neighbor, so we have to free both locks.

Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
2023-06-13 10:54:47 +01:00
Pavel Kumbrasev 3f657a3438 Fix task_task_arena for one thread env (#1131)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-06-13 10:54:13 +01:00
Pavel Kumbrasev f8f7f738f4 Fix current_thread_index for masterless arena(1,0) (#1128)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-06-13 08:54:09 +01:00
Konstantin Boyarinov fc184738eb Minor fixes for KW in tbbmalloc (#1124)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-06-08 12:52:09 +03:00
Ilya Isaev 50a1320c74 Install pdb files on MSVC (#1063)
*.pdb files are shipped in GH prebuilt binaries but they are not installed when trying to do make install

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-06-06 11:27:19 +02:00
Ilya Isaev e6684b220b Fix filenames strip for tbb4py installation on newer versions of setuptools (#1072)
When using setuptools version > 60 there is issue with cutting names of install files when passing build directory with ./.
Workaround is to use intermediate directory instead of ./.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-06-06 11:21:41 +02:00
Ilya Isaev 26b4256790 Use binary major version for dlopen on MacOS (#1062)
MacOS version of code tries to open unversioned binaries of runtime plugins unlike on Linux. This patch aligns this behavior.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-06-06 11:18:07 +02:00
Pavel Kumbrasev 3ca0656dda Compile resumable tasks with ucontext even if it is deprecated (#1123)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-06-06 10:12:39 +01:00
Brad Smith b74f657b48 Use CMAKE_DL_LIBS to properly choose to use libdl or not. (#1120)
Fixes build on *BSD with GCC. Same also done here for Clang..
https://github.com/oneapi-src/oneTBB/commit/dbccbee9f5527e802925852e225b1d1584f43a7a
2023-06-05 09:33:54 +02:00
Pavel KumbrasevandIlya Isaev ea4e6156a2 Fix build on systems without ucontext.h in libc (#1055)
* Enable thread based resumable tasks if ucontext is absent

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2023-06-01 14:40:05 +01:00
Krzysztof Filipek 42bd067650 Add issue labeler (#1070)
Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-05-30 16:01:19 +02:00
Vladislav Shchapov a6834cccb6 Update macOS 10.15 to macOS 12 in CI (#1113)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-05-26 09:45:48 +01:00
Alexandra 95f951176a Update Get Started Guide (#1110) 2023-05-24 17:01:02 +02:00
Alexandra 3c162e4ed6 Install sphinx-tabs extension at documentation stage (#1111) 2023-05-24 13:52:09 +02:00
Konstantin Boyarinov d238e987a5 Uncomment pipeline tests (#1106)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-05-22 13:12:17 +03:00
Konstantin Boyarinov b95e88f168 Remove extra whitespaces in copyright (#1105)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-05-22 11:55:30 +03:00
Ilya Lavrenov d91db363fe Allow to override CMAKE_POSITION_INDEPENDENT_CODE when build statically (#1100) 2023-05-22 09:33:52 +02:00
Konstantin Boyarinov a088cfa04f Use of std::invoke to run the body in algorithms and graph nodes (#880)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-05-17 19:29:13 +03:00
Ilya Isaev 9f4344b7e1 Use more robust way to find TBB libraries in cmake/pkg configs (#1088)
This patch replaces get_filename_component by find_library which is more flexible and can find libraries in multiple locations if PATH_SUFFIXES argument is specified.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-05-17 11:40:56 +02:00
Alexandra 0a6d67cde1 Create SECURITY.md (#1103) 2023-05-16 17:28:09 +02:00
JhaShweta1andKonstantin Boyarinov 155acce74e Adding helper methods to concurrent_queue and concurrent_bounded_queue (#1033)
* Align interface of concurrent_queue and concurrent_bounded_queue with the spec.

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
Co-authored-by: Konstantin Boyarinov <konstantin.boyarinov@intel.com>
2023-05-15 15:49:46 -05:00
sarathnandu 4bb2faa06e Add runtime support for disabling RTLD_DEEPBIND flag (#1065)
* Add runtime support for disabling RTLD_DEEPBIND by default to enable Address Sanitizer.

The Address Sanitizer will not work properly if the RTLD_DEEPBIND flag is passed to dlopen. The accepted workaround is to build your code without passing RTLD_DEEPBIND to dlopen when using the Address Sanitizer 

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
2023-05-15 07:37:32 -04:00
Alexandra 0416d88c18 Update SYSTEM_REQUIREMENTS.md (#1098) 2023-05-15 11:53:59 +02:00
Dmitri Mokhov 9515f14f7d Add DLL info for all tbbbind versions instead of just the default (#1095)
Also, add patch number to file version.

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-05-04 09:34:53 -05:00
Konstantin Boyarinov 4cc1ccac6f Fix 3-way comparison detection mechanism (#1094)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-05-03 15:53:16 +03:00
Alexandra 303848e4aa Update task_group_extensions.rst (#1084) 2023-05-03 13:32:33 +02:00
Alexandra 509659102c Update SYSTEM_REQUIREMENTS.md (#1090) 2023-05-02 18:25:34 +02:00
Alexandra f4082a4c20 doc: WASM support topic (#1025) 2023-05-02 18:05:20 +02:00
JhaShweta1andpavelkumbrasev 84bf9d452b Update Doctest to newer version (#999)
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-04-27 13:33:48 +01:00
Yun Hsiang e8e550e84f Add riscv64 toolchain.cmake (#1086)
Add riscv64 toolchain СMake
---------

Signed-off-by: Yun Hsiang <yun.hsiang@sifive.com>
2023-04-27 10:15:44 +02:00
Pavel Kumbrasev 04179683b6 Split test_join_node_key_matching into separate test files (#1089)
* Split test join_node_key_matching on two tests

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

* Correct copyright

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

* Correct file brief

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

* Apply review comments

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-04-26 15:15:23 +02:00
Alexandra cafca33508 Update Graph_Object.rst (#1036) 2023-04-24 15:33:15 +02:00
Lukasz Dorau fc06b29994 Do not intercept allocation symbols in tbbmalloc tests (fix) (#1079)
* Revert "Do not run the test_malloc_new_handler test under Valgrind (#1077)"

This reverts commit 727601afc0.

* Do not intercept allocation symbols in tbbmalloc tests (fix)

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.

With this change the test_malloc_new_handler test works correctly,
so let's revert #1077.

This patch fixes three tbbmalloc tests:
- test_malloc_new_handler,
- test_malloc_atexit,
- test_malloc_overload
that have not passed under Valgrind so far.

Fixes: #1080
Fixes: #1081
Ref: #1077

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>

---------

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-04-24 11:12:33 +02:00
Olga Malysheva 7196bb4fef Align vars.bat with the list of supported VS (#1085)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2023-04-24 11:05:51 +02:00
Alexandra d5225609e8 Update conf.py (#1082) 2023-04-20 12:25:38 +02:00
Lukasz Dorau 727601afc0 Do not run the test_malloc_new_handler test under Valgrind (#1077)
Add the NOMEMCHECK option to the tbb_add_test() function.

Do not run the test_malloc_new_handler test under Valgrind,
because this test throws an exception in new/new[],
but Valgrind cannot throw exceptions and so is aborting instead.

Fixes: #1075

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
2023-04-19 09:10:55 +02:00
Alexandra ce4c43b9f3 Update conf.py (#1078) 2023-04-18 22:22:20 +02:00
Krzysztof Filipek f55d4e09b6 Add GitHub Actions workflow for labeling PRs (#1064)
This PR adds an automatic labeling feature to OneTBB.
The purpose of this commit is to add initial support
and label PRs changing anything related to tbbmalloc.

Signed-off-by: Krzysztof Filipek <krzysztof.filipek@intel.com>
2023-04-17 09:54:58 +02:00
Konstantin Boyarinov 269d1c3e0c Fix uninitialized variable in tbbmalloc for KW (#1068)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-04-17 10:31:28 +03:00
Ilya Isaev 10a6d95e3b Upgrade oneTBB version to 2021.10 (#1073)
* Upgrade oneTBB version to 2021.10

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Fix copyrights

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-04-14 17:36:49 +02:00
Alexandra b7e669fdf8 Update SYSTEM_REQUIREMENTS.md (#1071) 2023-04-14 17:11:58 +02:00
Alexandra 9e62b0473a Doc fix (#1067) 2023-04-14 13:20:55 +02:00
Alexandra ecac5c6017 Update REALESE_NOTES.md (#1066) 2023-04-14 12:16:16 +02:00
Valentina Kats bb66e4a71c [TCM] Rename LICENSE.TXT to LICENSE.txt (#86) 2023-04-11 18:16:24 +02:00
Vladislav Shchapov a96a032f2c Fix for build error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] (#1059)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-04-06 09:13:36 +02:00
Ilya Isaev 5b2a49008c Set TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH to ON on MacOS (#1058)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-04-05 10:13:04 +02:00
Konstantin Boyarinov d5fd1e97a3 Fix reserve(0) issue for concurrent unordered containers (#1057)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-04-04 17:34:22 +03:00
Aleksei Fedotovandpavelkumbrasev cba4dee4cd [TCM] Update license in TCM files in accordance with the policy (#85)
Signed-off-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-04-04 11:36:24 +02:00
Valentina Kats 4379cf65fd [TCM] LICENSE.txt and third-party-programs.txt creation (#79)
* Create LICENSE.TXT

* Create third-party-programs.txt

* Add oneTBB to the list
2023-04-03 21:04:17 +02:00
sarathnanduandPavel Kumbrasev 2110128e4e Introduce new SDL compile flags on Windows and fix warnings. (#1035)
* Add Windows compiler flags related to security and fix TBB Malloc Warnings.
---------

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2023-03-30 08:31:51 -05:00
Vyacheslav Zhdanovskiy 13ccfff7c3 Avoid CMake warning if CPack is already included (#1054)
* Avoid CMake warning if CPack is already included

Signed-off-by: Vyacheslav Zhdanovskiy <vyacheslav.zhdanovskiy@nvi-research.com>

* Document the usage of an internal CPack variable

Signed-off-by: Vyacheslav Zhdanovskiy <vyacheslav.zhdanovskiy@nvi-research.com>

---------

Signed-off-by: Vyacheslav Zhdanovskiy <vyacheslav.zhdanovskiy@nvi-research.com>
2023-03-30 11:01:41 +02:00
Yun Hsiang 44505eb653 Disable ITT_NOTIFY for RISC-V (#1053)
ITT_NOTIFY doesn't support RISC-V. Disable it when building for RISC-V.

Signed-off-by: Yun Hsiang <yun.hsiang@sifive.com>
2023-03-29 17:22:01 +02:00
Aleksei Fedotov 7eca30594f [TCM] Catch thrown exceptions from the test (#81) 2023-03-24 09:33:05 +01:00
Ilya Isaev e5bfa25388 [TCM] Use export attributes on Linux (#80)
* Export only public API

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Add visibility-inlines-hidden

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-03-23 11:04:00 +01:00
Dmitri Mokhov e1f0f36054 Correct the minor interface version test (#1049)
In version.h, TBB_INTERFACE_VERSION_MINOR is defined as TBB_INTERFACE_VERSION%1000/10. This test works for single-digit minor versions, but starts failing, e.g., for TBB_INTERFACE_VERSION_MINOR=12110 (where minor version should be 11).

Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2023-03-22 15:35:18 -05:00
Dessie WilliamsandDessie Williams 47059fdef5 Updated Ubuntu 18.04 to latest (#1047)
* Update Ubuntu OS

* Update ci.yml

* Update ci.yml

* Update ci.yml

---------

Co-authored-by: Dessie Williams <109994540+dessie-williams@users.noreply.github.com>
2023-03-22 15:47:38 +01:00
Jonathan PeytonandFedotov, Aleksei 298411ea82 [TCM] Use standard predefined macro to detect Windows (#78)
/DWIN32 is automatically put on command line by CMake but isn't the standard predefined macro to detect Windows.
Instead, use _WIN32 || _WIN64 to detect Windows platform which is done in many other places in the code.

Co-authored-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2023-03-17 18:04:05 +01:00
Aleksei Fedotov 47a2bcec75 [TCM] Treat requests with automatic constraints specified as invalid (#77) 2023-03-16 18:20:14 +01:00
Alexandra a6a884ad0a Fixes to the lost topics (#1046) 2023-03-16 13:45:01 +01:00
Aleksei Fedotov 17e5e694fe [TCM] Return invalid argument if constraints and their size are not in sync (#76) 2023-03-15 18:02:18 +01:00
Ilya IsaevandPavel Kumbrasev 5ddf07d3b4 [TCM] Respect process affinity (#75)
* Respect process affinity

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Apply suggestions from code review

Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>

* Respect affinity in tests

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Fix constrained requests test not respecting affinity

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Remove redundant code

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Add comment to flags setting

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2023-03-15 16:51:31 +01:00
sarathnandu f91f55f25a Fix test build failure in Mips for debug mode. (#1042)
* Removed the "-fPIC -shared" flag added by cmake by default.

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
2023-03-14 15:10:57 -05:00
Alexandra 518643f326 Update conf.py (#1044) 2023-03-14 17:28:26 +01:00
Aleksei Fedotov b860fefdfd [TCM] Use oversubscribed concurrency for max_concurrency in constraints (#74)
If constraints are initialized by default but has the mask set, the value for max_concurrency should
be set to oversubscribed concurrency of the mask to be able to allocate as maximum resources as
possible and on the given mask, hence avoid violating compatibility rule.
2023-03-14 12:39:55 +01:00
Aleksei Fedotov 16631b6b65 [TCM] Fix wrong test assumption + improved readability (#73)
Test resource balancing had incorrect assumption that the callback was invoked after rigid concurrency request was made. Most likely, this was left untouched after FAIR RDS was changed to negotiate only required resources.
We did not notice that because the check for this did not propagate its status to the "public".
2023-03-14 11:02:16 +01:00
Alexandra bb45f09201 Update Get Started Guide with instruction of HWLOC usage (#1028) 2023-03-13 16:07:09 +01:00
Alexandra cf95d2cce3 Lost topics (#1027) 2023-03-13 15:12:45 +01:00
Alexandra 79b240c778 Update Working_on_the_Assembly_Line_pipeline.rst (#1009) 2023-03-13 15:11:46 +01:00
Ilya IsaevandAleksei Fedotov be844f72a7 [TCM] Add API to print meta info, slightly rework order of information printed (#64)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-03-10 12:08:42 +01:00
Aleksei Fedotov 4d74f22807 [TCM] Fix resource distribution during activation of a pending permit (#72)
If one permit deactivates the TCM now correctly redistribute the released resources to the activated permit with constraint.
2023-03-09 18:27:43 +01:00
Pavel Kumbrasev 1425eec954 [TCM] Fixed Coverity hints (#65)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-03-07 09:33:21 +00:00
Aleksei FedotovandIsaev, Ilya 92f229a4fc [TCM] Fix constraint parameters inference (#69)
* Update constraint's max_concurrency after inference of parameters

* Add back accidentally removed cv-qualifier

* Revert the use of unused variable

* Change benches order

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

---------

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-03-06 16:56:35 +01:00
Pavel KumbrasevandIsaev, Ilya b8e25ddbb5 [TCM] Add micro benchmark (#63)
* Add micro benchmark

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

* Add new line

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

* Add new benchmark scenarios

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

* Add CMake

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Correct compile flags

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>

* Fix unused variable

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

* Fix compilation on other compilers

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>

---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-03-06 15:56:34 +01:00
Ilya Isaev 0893628e3b [TCM] Add sonaming to TCM binaries (#68)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-03-03 10:38:08 +01:00
sarathnanduandIlya Isaev d8604942dc Fix for Cmake error when CMAKE_BUILD_TYPE is not set (#1037)
* Fix for Cmake error when CMAKE_BUILD_TYPE is not set

* Update the check for CMAKE_BUILD_TYPE

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>

* Update disabling LTO on debug mode.

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>

* Update cmake/utils.cmake

Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>

* Updated the copyright info

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>

---------

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2023-03-02 16:23:39 -06:00
Aleksei Fedotov fdaef045c8 [TCM] Infer minimum of requested resources by summing up constraints minimums (#67)
* Move constraints bounds summation into separate function
* Assume minimum requested resources equals to sum of constraint mins
2023-03-02 13:48:05 +00:00
Aleksei Fedotov 325480e7bc [TCM] Automatic inferring of request arguments (#66)
* WIP: Add test for the TCM request that was initialized by default

Also, add number of platform resources without oversubscription in tests and rename total_number_of_threads constaint.
2023-03-01 15:41:06 +01:00
Sam James 154cc73ca4 test: common: include <cstdlib> for abort() (fix build with GCC 13) (#1031)
GCC 13 (as usual for new compiler releases) shuffles around some
internal includes and so <cstdint> etc is no longer transitively included.

See https://www.gnu.org/software/gcc/gcc-13/porting_to.html.

Signed-off-by: Sam James <sam@gentoo.org>
2023-02-22 08:16:46 -06:00
Ilya Isaev 06ee8580f0 [TCM] Fix copyright and codespell scans (#60)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-22 10:45:51 +00:00
Ilya Isaev 89e920d4cc [TCM] Remove names from source code (#59)
Fix IPLDT scans hits
2023-02-21 14:34:47 +01:00
Pavel Kumbrasev 0e8ca5fc35 [TCM] Correct reg expression for HWLOC version parsing (#58)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-02-20 16:54:59 +01:00
Ilya IsaevandAleksei Fedotov ff44bc8435 [TCM] Add support for versioning, slightly rework environment variables behaviour (#32)
Support for printing meta info when TCM_VERSION is set to 1. Added runtime functions to get TCM version.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2023-02-20 11:13:52 +01:00
Olga Malysheva 18815e1243 Update Release Notes for 2021.8.0 release (#1029)
Signed-off-by: Olga Malysheva Olga.Malysheva@intel.com
2023-02-17 16:42:49 +01:00
Ilya Isaev 689cde15ac Disable LTO when configuring in Debug mode (#1026)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-17 14:59:21 +01:00
Pavel Kumbrasev 52cc85d009 [TCM] Wrote in permit_handle only on permit initialization (#57)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-02-16 13:00:16 +00:00
Ilya Isaev 0178faee56 [TCM] Change CPACK package name (#56)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-15 11:12:02 +00:00
Pavel Kumbrasev c81d0a7b2d [TCM] Add debug postfix to lib build (#55)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-02-15 10:16:35 +01:00
Aleksei Fedotov b9cbb9b93d [TCM] Add test to allow requesting of zero resources (#49)
This is useful for registration of the permit handle
2023-02-14 17:11:33 +01:00
Aleksei Fedotov be6f9ede7b [TCM] Use number of processor groups determination from HWLOC (#54)
It also corrects the first check for possibility to satisfy permit request, and updates the year in the Copyright notice.
2023-02-14 17:11:01 +01:00
Aleksei Fedotov 2b8944b0b1 [TCM] Make test overlapping clients more deterministric (#53) 2023-02-14 17:09:41 +01:00
sarathnandu e2dca807a1 Add Compiler defense flags to Clang and Gnu cmake files (#1022)
* Add flags to prevent compiler from optimizing out security checks
2023-02-13 17:17:11 +01:00
Aleksei Fedotov 8f9ac0a8ad [TCM] Extending test for premature exit of an application (#47)
* Add Windows implementation of the test

* Improve test_premature_exit

* Add error message in case the test is being built on unsupported OS
2023-02-13 16:50:53 +01:00
Ilya Isaev 4aa700d360 [TCM] Add TCM_DIR support (#51)
* Add option to run TCM test with external TCM library

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-13 15:49:51 +00:00
Aleksei Fedotov a1d78351f0 [TCM] Fix compilation errors of test for constrained requests on Windows (#48) 2023-02-13 16:46:48 +01:00
Vladislav Shchapov 9bd4d0650e Fix invalid WORKING_DIRECTORY for tests and multi-config CMake Generator (like Microsoft Visual Studio). (#870)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-02-13 11:09:59 +01:00
Pavel KumbrasevandFedotov, Aleksei eb69d23e73 [TCM] Move hwloc topology load to static method for eager initialization (#38)
Also, add the test that models the behaviour of oneTBB, where worker threads are detached.

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2023-02-10 16:42:30 +01:00
Aleksei Fedotov 421acb5d15 [TCM] Integrate other existing tests for constrained requests (#41) 2023-02-10 11:01:13 +01:00
Ilya Isaev 55cd6ea7fa [TCM] Add binaries signing support (#46)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-10 10:47:19 +01:00
Aleksei Fedotov d5a07be0a2 [TCM] Allow omitting client callback when connecting to the TCM (#45) 2023-02-10 10:39:01 +01:00
Fedotov, Aleksei 34da582c5f [TCM] Repair num_satisfiable field when calculating updates 2023-02-09 10:20:11 +01:00
Aleksei Fedotov b2690018cc [TCM] Test allow omitting mask when copy permit's data for constrained permit (#40) 2023-02-08 14:31:06 +01:00
Ilya Isaev ff688c362e [TCM] Install HWLOC to TCM package (#42)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-07 13:48:55 +00:00
Ilya Isaev 921c0359fe [TCM] Change name prefix from "zerm" to "tcm" (#35)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-06 11:17:26 +01:00
Ilya Isaev 7023fe29d9 [TCM] Add single output directory for binaries and tests (#37)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-02-06 11:16:41 +01:00
Fedotov, Aleksei 24a7a7eaa5 [TCM] Fix test_rb by removing uncertainty about resources distribution 2023-02-02 17:55:17 +01:00
Fedotov, Aleksei 26fa943fed [TCM] Rename copy_request() to precisely reflect its function 2023-01-30 14:24:35 +01:00
Fedotov, Aleksei b65cc03428 [TCM] Improve assert message 2023-01-30 14:24:35 +01:00
Fedotov, Aleksei 84e80d3db0 [TCM] Remove superfluous copying of HWLOC masks 2023-01-30 14:24:35 +01:00
pavelkumbrasev a98798e9b1 [TCM] Check mask only if exists
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-01-30 14:24:35 +01:00
Fedotov, Aleksei 7cf1c2f5fb [TCM] Compare masks during copying of permit request 2023-01-30 14:24:35 +01:00
Fedotov, Aleksei bd9d8312cd [TCM] Refactor the allocation and copying of the permit requests 2023-01-30 14:24:35 +01:00
Fedotov, Aleksei 2b1792db56 [TCM] Store permit request nearby permit data
This replaces the use of the unordered 'permit handle-to-request' map with a vector of permit
handles.
2023-01-30 14:24:35 +01:00
Fedotov, Aleksei cab94b9c65 [TCM] Remove incorrect asserts 2023-01-30 14:24:35 +01:00
Fedotov, Aleksei 5ddef563b8 [TCM] Do deep copying of permit requests
The deep copying helps in resolving possible crashes and data races issues.

The deep copying includes the copying of the constraints and their masks in case they were specified
by the client.

Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2023-01-30 14:24:35 +01:00
pavelkumbrasev 442ad60b78 [TCM] Add deep copy to req init in map
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-01-30 14:24:35 +01:00
Pavel KumbrasevandFedotov, Aleksei e8386bdad1 [TCM] Remove static from buffer objects (TSAN report) (#33)
Remove static qualifier from containers in renegotiate_permits()

Since containers become function locals and they are destroyed when execution goes out of scope, remove unnecessary clearing out on exit from renegotiate_permits()

---------

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2023-01-27 17:58:05 +01:00
Pavel KumbrasevandIlya Isaev f2ef7480b5 [TCM] Fix build on Windows (#34)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2023-01-27 12:29:29 +00:00
Pavel KumbrasevandIlya Isaev 815e8f0a28 [TCM] Add compiler configs in CMake (#29)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
2023-01-27 11:30:14 +00:00
Pavel Kumbrasev 23266bc541 Suppress TSAN warning on ITT initialization (#1020)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2023-01-27 10:51:30 +00:00
Jonathan Wakely 9acde48238 Remove shebang lines from Python files (#1017)
These files do not have the executable bit set in their file mode, and
they only need to be run as modules, not as executable scripts.

Signed-off-by: Jonathan Wakely <jwakely@fedoraproject.org>

Signed-off-by: Jonathan Wakely <jwakely@fedoraproject.org>
2023-01-26 12:09:23 +01:00
Fedotov, Aleksei f1d1a24875 [TCM] Fix representation of hwloc mask in the test system
The use of std::string results in the additional new line symbol when printing the mask on the
console, which makes its representation poor. Additionally, the size of the mask was computed
incorrectly, since 'hwloc_bitmap_weight' function returns the number of turned ON bits, instead of
the number of characters needed to represent the mask in the text form.

Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2023-01-26 10:35:27 +01:00
Andrew Corrigan 0cf592bd62 Reduces warnings using Xcode/AppleClang (#1018)
Signed-off-by: Andrew Corrigan <andrew.corrigan@gmail.com>
2023-01-26 08:39:38 +00:00
dda388c2f0 [TCM] Refactored constrained requests support (#27)
Signed-off-by: Pavlov, Evgeniy <evgeniy.pavlov@intel.com>
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Pavlov, Evgeniy <evgeniy.pavlov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-01-25 14:29:07 +00:00
Ilya Isaev fa5280c06f [TCM] Add CMake files and build dir to .gitignore (#28)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-01-19 11:20:54 +01:00
sarathnandu 3b161438c9 Prevent compiler from optimizing out security checks (#1007)
Add flags to prevent compiler from optimizing out security checks
2023-01-16 12:00:03 +01:00
Adrian Bunk fc2d7f9124 Build tbbmalloc also on mips (#845)
Signed-off-by: Adrian Bunk <bunk@debian.org>
2023-01-16 08:00:42 +00:00
Ilya Isaev 9434ec94f6 Suppress ICC deprecation warning for mallinfo (#1005)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2023-01-11 14:41:20 +01:00
Yuriy Chernyshov bef111d02f Fix compilation error on MacOS (#989) 2023-01-11 14:03:48 +01:00
Alexandra c497ad8a76 Fix filter_mode namespace of pipeline in the code blocks (#1002) 2023-01-11 10:15:15 +01:00
Alexandra 2e9b2b180e Update SYSTEM_REQUIREMENTS.md (#1003) 2023-01-10 18:19:40 +01:00
Vladislav Shchapov 989ede9661 Cleanup Windows resource files (#924)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2023-01-10 10:42:21 +00:00
kboyarinov 752cde6f12 Fix copyright year for PR983 (#1001)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2023-01-09 18:29:44 +02:00
John Paul Adrian Glaubitz 55b8e1b167 Use __sync_fetch_and_add() on ia64 with non-Intel compilers (#979) (#983)
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
2023-01-09 13:58:35 +02:00
Christian Fersch e6e493f96e Fix unmatched pragma warning push/pop (#996)
Signed-off-by: Christian Fersch <christian.fersch@ptvgroup.com>
2023-01-02 17:51:02 +02:00
kboyarinov f3303b1114 Fix test_numa_dist on Windows (#997)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2022-12-26 12:55:37 +02:00
Vertexwahn e6104c9599 Switch from bazel_tools to platfroms to support Bazel 6.0.0 (#994)
Signed-off-by: Vertexwahn <julian.amann@tum.de>
2022-12-21 16:19:28 +01:00
2ecfcf5afc Moving the Hybrid CPUs API out of preview (#680)
Move the Hybrid CPUs API out of preview. This patch removes the necessity of setting the preview macro and removes the API reference topic

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
Co-authored-by: Kochin Ivan <kochin.ivan@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2022-12-20 18:36:17 +01:00
Olga Malysheva 66c6d8e330 Update ittnotify and doctest copyright year (#993)
Signed-off-by: Olga Malysheva <olga.malysheva@intel.com>
2022-12-16 15:33:48 +01:00
kboyarinov cd44d19898 Fix/suppress warnings on gcc12.1 (#866)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2022-12-16 09:47:01 +00:00
Deepan fa4f581805 Make alias input_type protected for join_node (#868)
* Make typedef input_type protected so that it's not exposed in join_node public interface

Signed-off-by: Deepanjan Biswas <deepanjan.biswas@formlabs.com>

* Make join_FE_node typedefs private

Signed-off-by: Deepanjan Biswas <deepanjan.biswas@formlabs.com>

* Use a different name for the tuple size template argument

Signed-off-by: Deepanjan Biswas <deepanjan.biswas@formlabs.com>

* Use the new template argument name as the base class argument. This builds on macOS

Signed-off-by: Deepanjan Biswas <deepanjan.biswas@formlabs.com>

Signed-off-by: Deepanjan Biswas <deepanjan.biswas@formlabs.com>
2022-12-14 00:26:16 +02:00
Vladislav Shchapov c7157ce332 Workaroud to -Wdeprecated-declarations warnings on macOS 13 SDK (#954)
* Disable -Wdeprecated-declarations warning in doctest.

* Replace sprintf "%f" with std::to_string.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-12-13 10:48:09 +01:00
Dmitry Kurtaev d477500377 Fixes for Android NDK 25 (#953)
Signed-off-by: Dmitry Kurtaev <dmitry.kurtaev@gmail.com>
2022-12-13 10:42:28 +01:00
Anuya Welling 0e6d4699bb Replacing files to update ittnotify to tag v3.23.0 (#956)
* Replacing files to update ittnotify to tag v3.23.0

* codespell error elimination

* Adding back changes made by PR #917

* Adding back changes made by #850

* Changing copyright

* ITT RELEASE RESOURCES MACRO

* Fixing copyright issue

* Address changes for frontend.cpp
2022-12-12 17:19:23 +01:00
Ilya Isaev bc48c4a099 Add backoff to task_stream::pop (#931)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-12-07 16:17:37 +01:00
0f0d1cb994 Enable ThreadSanitizer on macOS (#911)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Isaev, Ilya <ilya.isaev@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2022-12-06 08:12:14 +00:00
Ilya Isaev 274f68e529 Remove unused variable from conformance_join_node.cpp (#975)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-12-02 17:23:19 +01:00
Pavel Kumbrasev 17b7834b80 Remove unused variable (#974)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-12-02 11:52:09 +00:00
Vladislav Shchapov 5e91b2c07d Fix: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]. (#969)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-11-26 11:49:29 -06:00
Alexandra 797dfaa7fc Update README.md (#964) 2022-11-16 16:59:40 +01:00
Cheney Wang dece01699f Add vcpkg installation instructions (#907)
* Add vcpkg installation instructions

* Update INSTALL.md
2022-11-16 12:26:12 +01:00
Alexandra f2e97f941e Rename Automically_Replacing_malloc.rst (#938) 2022-11-16 11:34:21 +01:00
kboyarinovandPavel Kumbrasev f2af74732b Fix part of Coverity hits (#960)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2022-11-14 15:51:48 +02:00
Ilya Isaev 3fefeb64b3 Update interface version for oneTBB 2021.9 (#962)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-11-14 13:07:42 +01:00
Rui Ueyama 4146a9e1f1 Fix ASAN issue (#959)
ASAN report an error if we tries to downcast a misaligned address.
To avoid it, we need to check if an address is valid before casting it.

Here is the ASAN error:

/home/runner/work/mold/mold/third-party/tbb/src/tbb/../../include/tbb/../oneapi/tbb/concurrent_hash_map.h:446:23: runtime error: downcast of misaligned address 0x000000000003 for type 'tbb::detail::d2::hash_map_iterator<tbb::detail::d2::concurrent_hash_map<std::basic_string_view<char, std::char_traits<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, tbb::detail::d1::tbb_hash_compare<std::basic_string_view<char, std::char_traits<char>>>, tbb::detail::d1::tbb_allocator<std::pair<const std::basic_string_view<char, std::char_traits<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>>, std::pair<const std::basic_string_view<char, std::char_traits<char>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, st0x000000000003: note: pointer points here
<memory cannot be printed>
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/runner/work/mold/mold/third-party/tbb/src/tbb/../../include/tbb/../oneapi/tbb/concurrent_hash_map.h:446:23

Signed-off-by: Rui Ueyama <ruiu@cs.stanford.edu>

Signed-off-by: Rui Ueyama <ruiu@cs.stanford.edu>
2022-11-14 11:57:50 +02:00
Alexandra b14b68a522 Update README.md (#901) 2022-11-14 10:50:52 +01:00
kboyarinov 3003ec0774 Fix "field used uninitialized" on modern gcc versions (#958)
Signed-off-by: kboyarinov <konstantin.boyarinov@intel.com>
2022-11-09 17:02:48 +02:00
Alexandpavelkumbrasev eac9465052 Fix concurrent_[bounded_]queue correctness on weak memory models (#782)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-11-04 09:39:20 +00:00
a45d68f28e Update release notes for oneTBB 2021.7 (#872)
* Update release notes for oneTBB 2021.7

* Update RELEASE_NOTES.md

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
Co-authored-by: Timmie Smith <timmie.smith@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2022-10-26 18:04:44 +02:00
Rui Ueyama 137c1a88b6 Retry if pthread_create fails with EAGAIN (#824)
Signed-off-by: Rui Ueyama <ruiu@cs.stanford.edu>
2022-10-26 12:54:20 +01:00
Ilya Isaev ceacd2207e Rework test_eh_thread to avoid sporadic failures (#946)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-10-26 12:13:51 +01:00
Ilya Isaev cb88c51c9c Handle case when LRU history capacity is zero (#939)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-10-21 15:02:08 +02:00
Ilya Isaev 912cd2b0b3 Fix build with source dir path containing spaces (#930)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-10-20 10:30:35 +02:00
Dirk MuellerandMo Zhou e8666c0b9c Add s390x, hppa and riscv64 architecture detection (#917)
* Fix build failure for s390x and hppa architectures.

Signed-off-by: Mo Zhou <cdluminate@gmail.com>

* Add riscv64 architecture detection

Signed-off-by: Dirk Müller <dirk@dmllr.de>

Signed-off-by: Mo Zhou <cdluminate@gmail.com>
Signed-off-by: Dirk Müller <dirk@dmllr.de>
Co-authored-by: Mo Zhou <cdluminate@gmail.com>
2022-10-18 11:34:09 +03:00
Vladislav Shchapov 71b04524d0 Workaround for test_dynamic_link builded with gcc and lto
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-10-17 19:19:23 +01:00
Ilya Isaev aa247fa816 [tbb::parallel_for_each] Don't call destructor for uninitialized object (#933)
Current implementation of parallel_for_each may call destructors for uninitialized objects when using Input iterator and count of elements in block is less than max_block_size. This is UB and can lead to incorrect memory access in some scenarios.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-10-17 14:03:06 +02:00
Kavin Teenakul 13544f9432 Update INSTALL.md (#820)
fix typo
2022-10-13 18:12:13 +03:00
AlexandraandPavel Kumbrasev 635761449f Update testing_approach.rst (#937)
* Update testing_approach.rst

* Update doc/main/intro/testing_approach.rst

Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>

Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2022-10-11 18:08:27 +02:00
Pavel Kumbrasev 6bfd29bde7 Exclude includes from version.h during .rc files comilation (#928)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-10-05 12:57:13 +02:00
egfefey e6459e22ae Delete resource.rc (#922) 2022-10-05 11:17:35 +01:00
egfefey 85792ca411 Egfefey patch windows dll (#916)
* Restoring Windows DLL details information

This restores the detailed information in the Windows dll. This has been absent from the revamped oneTBB.

* Update CMakeLists.txt

Enabling build of Windows resource file.

* Update CMakeLists.txt

Updating copyright year

* Add files via upload

Adding Windows resource file for tbbmalloc

* Update CMakeLists.txt

Enabling building of tbbmalloc resource file

* Add files via upload

Adding tbbmalloc_proxy Windows resource file

* Update CMakeLists.txt

Enabling the build of tbbmalloc_proxy resource file

* Add files via upload

Adding tbbbind resource file

* Update CMakeLists.txt

Enabling tbbbind resource file build

* Update resource.rc

Product name update in resource file

* Update CMakeLists.txt

Restricting resource build to default tbbbind

* Add files via upload

Replacing resource.rc with tbb.rc to conform with other dlls (tbbmalloc, tbbbind etc)

* Update CMakeLists.txt

Update from resource.rc to tbb.rc

* Update CMakeLists.txt

Updating copyright year

* Update CMakeLists.txt

Updating the copyright year

* Update tbb.rc

Removing "Windows" from the product name and sourcing the version from version.h

* Update tbb_bind.rc

Removing "Windows" from the product name and sourcing the version info from version.h

* Update tbbmalloc.rc

Removing "Windows" from the product name and sourcing the version info from version.h

* Update tbbmalloc_proxy.rc

Removing "Windows" from the product name and sourcing the version info from version.h
2022-09-30 12:51:10 -05:00
kboyarinov 3fbdbb8b2e Fix the implicit deduction guides on MacOS (#898) 2022-09-28 14:12:46 +03:00
Vladislav Shchapov 3c91aea522 Fix universal binary build on macos. (#919)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-09-27 13:15:06 +02:00
Ilya Isaev 2eccd5f998 Fix tbb4py test sporadic fails (#913)
There are sporadic fails with tbb4py test (test.py). The problem is that some test cases rely on the fact, that submitted async work will not finish until calling get with timeout. To do there is a call for time.sleep in functor submitted. Sporadically, expected result is not happening (like OSX example in issue) so to prevent that, the blocking is used.

Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
2022-09-26 16:14:17 +02:00
cc3a9aa992 Correct behavior for proportional_mode (#904)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: kboyarinov <konstantin.boyarinov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2022-09-26 14:29:27 +01:00
Alexandra 104fb5c9de Testing approach doc (#914)
* Signed-off-by:Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com

* Update testing_approach.rst
2022-09-26 12:35:30 +02:00
Pavel Kumbrasev f10350212b Remove unused function from _concurrent_queue_base.h (#915)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-09-23 14:18:20 +01:00
kboyarinov 8155aaeb6b Fix concurrent queues not to require default constructor from T (#886)
* Fix concurrent_queue::clear not to require default ctor

* Suppress warning about the unused variable in release mode

* Fix the conformance test not to rely on the additional item in dtor

* template->class in template template parameter

* Rework the fix

* Remove unnecessary flag from internal pop method

* Minor clean-up

* Add exception macros to the test

* Add whitespace

* Fix PR comments

* Fix logic for a build with no exceptions
2022-09-05 11:03:53 +03:00
Alexandra f3747fed09 Fix an analytics script (#874) 2022-09-01 10:43:46 +02:00
Valentina Kats a748475d7a Update version number for oneTBB 2021.8.0 (#883)
* Update version.h

* Address feedback
2022-08-31 13:23:25 +02:00
kboyarinov 57f8bb1d99 Fix concurrent_bounded_queue::pop return type (#888) 2022-08-29 17:33:37 +03:00
Jakub Kopal 01fa1414a2 Fix concurrent-queue pop comment (#809)
* fix concurrent-queue pop comment

* Update copyright date
2022-08-29 11:07:03 +03:00
Anuya Welling dce182a7b5 Fixing clang error on tbb numa test (#867) 2022-08-17 14:48:23 -05:00
Kirigami 5cb212d447 add loongarch support (#850)
* add loongarch support

* update the copyright year of ittnotify_config.h
2022-08-14 11:21:51 +03:00
Timmie Smith 323260671b Resolving doctest errors - correcting test classifications. (#856) 2022-07-15 19:25:59 -05:00
Anuya Welling 4b895704d8 Addressing doctest error - found wrong tag : number (#855) 2022-07-13 08:39:34 -05:00
andreastedile fc824596aa Fix typo (#852)
Signed-off-by: andreastedile <andrea.stedile@studenti.unitn.it>
2022-07-06 18:04:32 -05:00
Vladislav Shchapov bc7e83a2f0 Fix signed/unsigned compare. (#849)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
2022-06-29 10:46:52 -05:00
Anuya Welling 0a521127a8 Tbb numa bug fix (#842)
* Add fix for close scheme numa affinity.

Signed-off-by: sarathnandu <sarath.nandu.ramachandran.nair@intel.com>
2022-06-27 18:12:30 -05:00
sarathnanduandAnuya Welling 5deb46f4c2 Add Win Numa test-cases (#846)
* Added tests for overflow and using all threads

Signed-off-by: Sarath Nandu R <sarath.nandu.ramachandran.nair@intel.com>
Co-authored-by: Anuya Welling <anuya.welling@intel.com>
2022-06-27 18:04:48 -05:00
Christoph Erhardt 801df0edeb Fix overeager stripping of compile flag (#716)
The existing regex strips all occurrences of the given string from
`${CMAKE_CXX_FLAGS}`, regardless of whether it is just a substring of a
flag. For instance, `-Werror=format-security` gets truncated to
`=format-security`.

The new regex makes sure that only whole words get replaced.

Signed-off-by: Christoph Erhardt <github@sicherha.de>
2022-06-02 10:04:22 -05:00
Dmitri Mokhov 451e76ef68 Do not store in LargeObjectCache objects whose sizes align to maxHugeSize (#838)
Signed-off-by: Dmitri Mokhov <dmitri.n.mokhov@intel.com>
2022-05-26 12:56:50 -05:00
Valentina Kats faaf43c4ab Update RELEASE_NOTES.md for oneTBB 2021.6 (#835) 2022-05-20 13:21:25 -05:00
AlexandAlexander A Utkin c14ecee586 [TCM] Fix a couple of races (#8)
* Fix a couple of races

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>

* Rework skip logic

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>

* Fix allotment logic

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>

* Review changes.

* Correct test log messages

* Review changes

* Correct test utils

* Update test test_static_permit (rework and rename)

* Correct test

* Code correction

* Use skip_concurrenency_checkc flag in test_rigid_concurrency_permit() function

Co-authored-by: Alexander A Utkin <alexander.utkin@intel.com>
2022-04-05 18:31:01 +03:00
Alexey Veprev 9d2a3477ce CMake/readme: fix note (#805) 2022-04-01 16:49:55 +03:00
Alexey Veprev d6f4c40e83 [TCM] CMake: create README with basic build instructions (#22) 2022-03-31 22:30:36 +03:00
Alex Utkin f343fbde09 [TCM] Correction: MSVC not package bit fields with mixed types (#21)
* Correction: MSVC not package bit fields with mixed types
* Fix comment in static assert
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2022-03-31 18:38:38 +03:00
Alex Utkin 2ac6c07be8 [TCM] Fix Windows compilation issues (#19)
* Windows compilation issues: prevent min/max problem, secure warnings and etc.

* Windows compilation issues: C4101: unreferenced local variable.

* Windows compilation issues: C4018: signed/unsigned mismatch and bool issue.

* Windows compilation issues: C4018: signed/unsigned mismatch and bool issue. Part II

* Windows compilation issues: suppress compile warnings.

* Windows compilation issues: suppress compile warnings. Part II

* Windows compilation issues: adds helpers to simplify test code.

* Windows compilation issues: temporary comment static_asserts - not pass on MSVC.

* Corrects test name in log.

* Simplify test framework.

* Changes logging output.

* Windows compilation issues: don't use static assert for structures with bit-fields on Windows.

* Review changes.

* Correct project compile options.

* Windows compilation issues: correct tests.

* Windows compilation issues: avoid compile warnings.

* Windows compilation issues: correct Linux build.

* Prevent error: unused variable.

* Style correction.

* Rework CMake configuration: creates common part as separate file.

* Suppress compile warnings for test on Linux.

* Suppress compile warnings for test on Linux. Update.

* Corrects tests to avoid missing-field-initializers warning on Linux.

* Review changes.

* Integrate new test helpers.

* Review changes: migrate to system processing include file not found in CMake.
2022-03-31 15:53:16 +03:00
Evgeniy Pavlov 5ac88fef28 [TCM] Split TCM's header onto two: with API and data structures (#16)
Signed-off-by: Pavlov, Evgeniy <evgeniy.pavlov@intel.com>
2022-03-25 19:54:50 +03:00
Alexandra 3e352b4812 Update layout.html (#815) 2022-03-25 14:02:28 +03:00
Alexandra 4aa0b0b2db Update examples.rst (#816) 2022-03-24 16:52:43 +03:00
Aleksei Fedotov a791791b88 [TCM] Recognize TCM_DISABLE environment variable (#13)
There is a need for global switch for TCM. The idea is to have an envariable that, when set to anything except for zero, makes the TCM to drop connection attempts.
In order to have reasonable performance this variable is read only once - at the library load time when its globals are initialized. Because of that it is impossible to write single test that changes the variable during the test and makes connection attempts to the TCM. Therefore, the patch adds three identical tests, but modifies the environment these tests are invoked in.

The patch addresses issue #6.
2022-03-24 10:57:38 +03:00
Alexandra 3859d1111f Update conf.py (#812) 2022-03-22 17:52:55 +03:00
Alexandra efea9935d1 Update intro_gsg.rst (#811) 2022-03-21 14:42:01 +03:00
Anton PotapovandAlexandra ed9d4b5e9a TBB DOC : Dev Guide: Task Scheduler Bypass and How Does Task Scheduler Works (#521)
* TBB DOC : Dev Guide: Task Scheduler Bypass and How Task Scheduler
Works

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2022-03-21 11:24:26 +03:00
Alexandra 0a0a5926ee Update conf.py (#810) 2022-03-18 18:26:28 +03:00
Alexandra 2c4f282e86 Update intro_gsg.rst (#808) 2022-03-18 16:53:06 +03:00
Alexandra 05023723ff Update Get Started Guide (#803) 2022-03-16 13:25:18 +03:00
Evgeniy Pavlov 6ecebd90d9 [TCM] Add the RM design document in RST format converted from *.docx (#5)
* Add the TCM design doc in RST-format

Signed-off-by: Pavlov, Evgeniy <evgeniy.pavlov@intel.com>
2022-03-15 15:10:05 +03:00
Alex 500abe33f8 Workaround conflict with _CRTDBG_MAP_ALLOC (#787)
* Workaround conflict with _CRTDBG_MAP_ALLOC

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-03-15 09:21:35 +03:00
Aleksei Fedotov 39eeb13af4 [TCM] Add initial implementation of the Thread Composability Manager (#2)
* Add initial implementation of the Thread Composability Manager

Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2022-03-09 19:14:40 +03:00
Aleksei Fedotov 0a09c4ff54 [TCM] Add Git-related machinery (#1)
Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2022-03-09 18:16:12 +03:00
Ilya Isaev 1da8f0d33b Add topic about "Lazy Initiliazation" pattern to Design patterns (#790)
New topic about Lazy initialization pattern and how it can be implemented using oneapi::tbb::collaborative_call_once has been added.

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2022-03-09 16:56:39 +03:00
a938322524 Document a way to flow graph can be attached to arbitrary task_arena (#785)
* Document a way to flow graph can be attached to arbitrary task_arena

task_arena interface provides mechanisms to guide tasks execution within the arena by
setting the preferred computation units or restricting part of computation units. In some
cases, you may want to use mechanisms within a flow graph.

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
Co-authored-by: Alexandra Epanchinzeva <alexandra.epanchinzeva@intel.com>
2022-03-09 15:04:40 +03:00
Fedotov, Aleksei 3f9baefb41 [TCM] Add README 2022-03-05 11:54:53 +03:00
Vladislav Shchapov af90f6cffc CMake/test: fix -rdynamic for full LTO build (#798)
Signed-off-by: Vladislav Shchapov <phprus@gmail.com>
2022-03-05 10:11:43 +03:00
Alexandra e386960a77 Instruction for building the docs locally (#778) 2022-03-04 19:49:25 +03:00
Alexandra ce0d258e72 Update doc structure and add new files (#791) 2022-03-02 18:37:52 +03:00
Sergey Zheltov 09346731f1 CI: don't run copyright_check on master branch (#792) 2022-02-28 19:11:12 +03:00
Aleksei Fedotov e5cbe500d2 Actualize documentation about proportional splitting constructor in Range (#728)
Actualize documentation about proportional splitting

Signed-off-by: Fedotov, Aleksei <aleksei.fedotov@intel.com>
2022-02-28 10:34:08 +03:00
KseniiaBakina a392038c6d Add copyright checker (#784) 2022-02-28 06:59:04 +03:00
Ilya Isaev f8102d5ba7 Fix test_collaborative_call_once SIGABRT on ARM 32 bit(#789)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2022-02-24 16:56:05 +03:00
Alex 31cba51f69 Rework incorrect assert in try_destroy_arena (#781)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-02-21 11:33:26 +03:00
Alex ab1409e16b Fix incorrect assertion in test_eh_algorithms (#771)
* Fix incorrect assertion in test_eh_algorithms

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-02-21 11:02:56 +03:00
Pavel Kumbrasev a8681a54c2 Remove suspend_callback_wrapper struct (#780)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-02-21 10:06:32 +03:00
Pavel KumbrasevandAlex e77098d67f Call suspend user function on the calling thread (#727)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
Co-authored-by: Alex <alexei.katranov@intel.com>
2022-02-18 11:44:43 +03:00
Alexandra 6666292fbf Update conf.py (#774) 2022-02-16 14:49:57 +03:00
Alexey Veprev c9e43df346 version.h: fix year (#772)
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>
2022-02-10 11:01:19 +03:00
Alexey Veprev 39c6fa3010 Update version number for 2021.7 (#770)
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>
2022-02-09 15:47:50 +03:00
Sergey Zheltov 690aaf497a Update copyright year 2021 -> 2022 (#769)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2022-02-09 12:59:44 +03:00
kboyarinov 56cb263e40 Fix incorrect access to concurrent_hash_map from transparent insertion (#759)
* Fix incorrect access

* Add test for chmap access modes

* Change copyright year for test_concurrent_hash_map.cpp
2022-02-07 16:45:43 +03:00
Alex 18e06f7f6b Simplify private worker synchronization mechanism (#754)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-02-07 15:03:03 +03:00
Anton PotapovandAlexandra fd76f45215 Documentation update for unpreview task_handle and related stuff (#755)
* Unpreview task_handle and related stuff

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2022-02-07 12:35:20 +03:00
Julien Voisin 3a7f96db56 mallinfo is only defined on glibc and android (#764)
It currently prevents compilation under musl:

```
[ 90%] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o
/__w/mimalloc-bench/mimalloc-bench/extern/tbb/src/tbbmalloc_proxy/proxy.cpp:263:26: error: return type 'struct mallinfo' is incomplete
  263 | struct mallinfo mallinfo() __THROW
      |                          ^
compilation terminated due to -Wfatal-errors.
``
2022-02-07 09:56:15 +03:00
Alexandra e274a9e4b3 Update CONTRIBUTING.md (#765) 2022-02-04 21:39:41 +03:00
Alex f5ed9a6b6a Workaround ASAN false positive in test_eh_algorithm (#767)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-02-04 14:12:45 +03:00
Rui Ueyama 6a15b64093 Make tbb compile with musl libc (#748)
TBB resumable tasks are implemented using getcontext() and setcontext()
on Unix-like systems. These functions are deprecated in the recent
versions of POSIX and may not exist. musl libc does not provide these
functions.

There's unfortunately no way to detect musl (musl intentionally do not
define macros like `__MUSL__`), so __TBB_RESUMABLE_TASKS is defined if
`__GLIBC__`. glibc-compatible libc's such as uClibc defines `__GLIBC__`,
so it should work as a catch-all condition.

Signed-off-by: Rui Ueyama <ruiu@cs.stanford.edu>
2022-02-04 13:32:11 +03:00
fpliu c17f1ec1cb CMake: fix ANDROID_STL handling (issue #710) (#729)
ANDROID_STL variable is optional, it may be empty. ${ANDROID_STL} should be enclosed in quotation marks.

Reference:
https://developer.android.com/ndk/guides/cmake#android_stl

Signed-off-by: leleliu008 <leleliu008@gmail.com>
2022-02-04 10:58:53 +03:00
Alex 219c42520c Fix external thread termination (#762)
* Fix external thread termination
* Fix tls key corruption for the last external thread
* Refactor task_dispatch attach/detach logic

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-02-04 10:21:05 +03:00
Vladimir SerovandAleksei Fedotov 5d21288abc Code coverage for overwrite_node (#760)
Test for coverage cancel function of oneapi::tbb::flow::overwrite_node::register_predecessor_task

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2022-02-03 13:32:09 +03:00
Sergey Zheltov 2a9ed7045e CI: replace testing on Windows Server 2016 + VS2017 with Server 2022 + VS2022 (#763)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2022-02-02 19:14:21 +03:00
Sergey Zheltov c21e688ad0 Update copyright year 2021 -> 2022 (#761)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2022-02-01 19:40:54 +03:00
Sergey Zheltov cd6a5f9f4a CI: fix documentation build error (#753) 2022-01-27 15:08:48 +03:00
Vertexwahn 3c76824ade Add Bazel build support for macOS (#746)
Signed-off-by: Julian Amann <julian.amann@tum.de>
2022-01-27 10:48:48 +03:00
Pavel Kumbrasev 525a38895c Fix incorrect synchronization in private server (#739)
* Fix a race in thread shutdown protocol

Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-01-26 15:21:41 +03:00
Ilya Isaevandvlserov 57f524ca71 clang-tidy: use nullptr instead of NULL (#631)
This patch applies clang-tidy check- modernize-use-nullptr

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: vlserov <vladimir.serov@intel.com>
2022-01-26 12:39:57 +03:00
Alex 4d2254b08f Improve code readability in private_worker (#752)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-01-26 07:46:34 +03:00
Alexandra 4eda0f93a7 Update pull_request_template.md (#751)
Signed-off-by: Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com
2022-01-25 14:45:12 +03:00
Ilya Isaev e0cc518745 Split tbb::flow::join_node testing into separate test files (#741)
In order to reduce GOT size on MIPS that leads to linkage errors (relocation truncated to fit: R_MIPS_GOT_PAGE) in debug, tbb::flow::join_node testing was split into separate files.

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2022-01-24 19:19:36 +03:00
Sergey Zheltov 35e0f552bd Fix DLL loading for tbb4py on Windows (#749)
* Fix DLL loading for tbb4py on Windows

Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>

* Fix copyright year

Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2022-01-24 18:35:12 +03:00
Anton Potapov 74207e5d2d Fix race in conformance_task_arena (#744)
* Fix race in conformance_task_arena

- call observe(false) in the derived observer destructor
- do the same for all observers in the tests 

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2022-01-24 12:25:29 +03:00
Sergey Zheltov 13f9f32b3a Update copyright year 2021 -> 2022 (#743)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2022-01-21 17:09:47 +03:00
kboyarinovandAlexei Katranov 555bc873f8 Fix unordered and ordered containers ranges for empty containers (#703)
* Fix container::range_type behavior in case of empty containers

* Remove test that violates the spec

* Fix range.begin to point to a value node

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>

* Remove first_value_node from empty

Co-authored-by: Alexei Katranov <alexei.katranov@intel.com>
2022-01-21 11:09:12 +03:00
Alexey Oralov 1bfd90d19a Delete tbb_gen_vars (#742)
Signed-off-by: Aleksey Oralov <alexey.oralov@intel.com>
2022-01-20 22:22:38 +03:00
Pavel Kumbrasev a36bf9cb86 Fix incorrect resize behavior with first_block (#735)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2022-01-20 12:01:21 +03:00
Alexey VeprevandAlexandra 70ac2444f5 INSTALL.md: add example for multi-config generators (#736)
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2022-01-19 12:21:21 +03:00
Alexandra 1318c0582e Update conf.py (#737)
Signed-off-by: Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com
2022-01-18 16:26:45 +03:00
Alexandra 6b0507b72d Update RELEASE_NOTES.md (#734)
Signed-off-by: Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com
2022-01-17 15:18:23 +03:00
Anton PotapovandPavel Kumbrasev 84efdd2a87 making task_group_context::is_proxy race free (#726)
* making task_group_context::is_proxy race free

using special value of task_group_context::my_state (former my_lifetime_state) to avoid
races on task_group_context::my_traits

the race was on task_group_context::my_traits member
- it was read by the is_proxy() member during task spawning
- it was written to in bind_to() function on first task spawning

- some renamings
 -  task_group_context::my_state -> my_may_have_children
 -  task_group_context::my_lifetime_state ->my_state
 -  task_group_context::lifetime_state -> state

- removed unused enum values

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2022-01-17 15:15:22 +03:00
Anton Potapov f1ba69bde9 Rectifing testing of some preview features controlled by __TBB_CPF_BUILD (#732)
Explicit enabling of task_group related preview features was removed, in favor of logic in test/common/config.h

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2022-01-17 09:47:24 +03:00
Anton Potapov 14d3d41f81 Missed part of task_group_exptensions unpreview (#668) (#731)
Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2022-01-17 09:46:23 +03:00
Alex ec39c5463d Fix overflow in concurrent_hash_map (#704)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-01-13 12:29:23 +03:00
Alex 1eaccf7a8c Improve task arena test coverage (#725)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2022-01-13 12:29:07 +03:00
Anton Potapov 3db67b5ba2 Fixed deadlock in the task_group conforance tests (#699)
- use same arena for task_group::run() and task_group::wait() methods
- use single thread environment for test stability

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2022-01-11 22:39:11 +03:00
Ilya Isaev 4ba6676737 Update doctest version to 2.4.7 (#692)
Updated doctest version to the new released 2.4.7 and applied necessary locally made workarounds

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2022-01-10 18:55:21 +03:00
Anton Potapov 603d9f7e17 Fix Migration Guide Link (#721) 2022-01-10 17:23:02 +03:00
Ivan Kochin e386c96deb Update the name of the link to the CMake readme (#722)
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2022-01-10 15:32:25 +03:00
Vladimir Serov d1667d514d VS2015: fix possible unreached code warning (#706)
Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-12-30 09:48:40 +03:00
AlexandAnton Potapov 5fc0a5f6b3 task_scheduler_handle productization (#566)
* task_scheduler_handle productization

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com

Co-authored-by: Anton Potapov <anton.potapov@intel.com>
2021-12-29 21:28:56 +03:00
Alex 90b0671b31 Resolve doxygen class naming conflicts (#705)
* Fix doxygen class naming conflicts

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-12-28 17:30:10 +03:00
Alexey Veprev 0860b7f562 CMake: convert TBB_SIGNTOOL path TO_CMAKE_PATH (#701)
Signed-off-by: Veprev, Alexey alexey.veprev@intel.com
2021-12-27 11:15:16 +03:00
Vladislav Shchapov 013035b4e9 Fix issue #687 (test_eh_thread) (#697)
Signed-off-by: Vladislav Shchapov <phprus@gmail.com>
2021-12-23 17:17:24 +03:00
Vladimir Serov 534428d0f8 Build issue: GCC 4.8 bug (#693)
Class template inheritance doesn't work well with function-local types
Move class definition to global scope

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-12-22 16:52:00 +03:00
Andrey Semashev 8a87469451 Optimize x86 atomic_fence (#328)
* Added optimized x86 atomic_fence for gcc-compatible compilers.

On x86 (32 and 64-bit) any lock-prefixed instruction provides sequential
consistency guarantees for atomic operations and is more efficient than
mfence.

We are choosing a "lock not" on a dummy byte on the stack for the following
reasons:

 - The "not" instruction does not affect flags or clobber any registers.
   The memory operand is presumably accessible through esp/rsp.
 - The dummy byte variable is at the top of the stack, which is likely
   hot in cache.
 - The dummy variable does not alias any other data on the stack, which
   means the "lock not" instruction won't introduce any false data
   dependencies with prior or following instructions.

In order to avoid various sanitizers and valgrind complaining, we have to
initialize the dummy variable to zero prior to the operation.

Additionally, for memory orders weaker than seq_cst there is no need for
any special instructions, and we only need a compiler fence. For the relaxed
memory order we don't need even that.

This optimization is only enabled for gcc up to version 11. In gcc 11 the
compiler implements a similar optimization for std::atomic_thread_fence.
Compilers compatible with gcc (namely, clang up to 13 and icc up to 2021.3.0,
inclusively) identify themselves as gcc < 11 and also benefit from this
optimization, as they otherwise generate mfence for
std::atomic_thread_fence(std::memory_order_seq_cst).

Signed-off-by: Andrey Semashev <andrey.semashev@gmail.com>

* Removed explicit mfence in atomic_fence on Windows.

The necessary instructions according to the memory order argument
should already be generated by std::atomic_thread_fence.

Signed-off-by: Andrey Semashev <andrey.semashev@gmail.com>

* Removed memory order argument from atomic_fence.

The code uses memory_order_seq_cst in all call sites of atomic_fence,
so remove the argument and simplifiy the implementation a bit. Also, renamed
the function to make the memory order it implements apparent.

Signed-off-by: Andrey Semashev <andrey.semashev@gmail.com>
2021-12-22 13:18:30 +03:00
74b7fc748b Moving task_group_exptensions out of the preview (#668)
Moving task_group_exptensions out of the preview

- moved all but :
  - is_inside_task
  - scheduller bypass

- replaced exceptions with asserts for undefined behavior
 - made some flags in the tests non-atomic for TSAN to raise a flag if
implementation is incorrect

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
Co-authored-by: Ilya Isaev <ilya.isaev@intel.com>
Co-authored-by: Alex <alexei.katranov@intel.com>
2021-12-21 12:03:42 +03:00
Alexandra 6563a2225b Update README.md (#674)
* Update README.md

Signed-off-by: Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2021-12-21 11:28:07 +03:00
Khem Raj 883c2e5245 Musl/linux can not use RTLD_DEEPBIND (#684)
Exclude non-glibc linux systems along with android
Fixes
src/tbb/dynamic_link.cpp:417:29: error: use
 of undeclared identifier 'RTLD_DEEPBIND'                                                                                    |             flags = flags | RTLD_DEEPBIND;
|                             ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-12-15 19:08:07 +03:00
Ilya MishinandSerov, Vladimir 0815661e4c Fix limiter_node decrementer (#647)
* Fix limiter_node decrementer

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Fix align

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* add new variable for check unused decrements

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove iostream

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove unnesessary cast

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* align whitespaces

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Fix whitespace alignment

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>

* Revert workaround for GCC

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>

Co-authored-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-12-13 11:59:05 +03:00
Vladimir Serov 6edb5c3ae9 Deallocate object with based on actual type (#667)
* Deallocate object with based on actual type

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-12-13 11:58:32 +03:00
Alexandra 56d44d28bb Restructuring the docs (#683) 2021-12-10 16:41:38 +03:00
Vladimir Serov 952845afef Suppress data race during ittnotify initialization (#659)
Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-12-08 12:33:41 +03:00
Ilya MishinandAleksei Fedotov 324afd9e4d Catch exception in lightweight node (#623)
* Add raii to aggregator to prevent stuck

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Add test

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Reuse tbb raii guard

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Add header

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* execute_and_wait lightweight task

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove unused headers

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove space

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove std::function

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* noexcept lightweight body

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix cmake

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix space

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* gcc error

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* declval gateway_type

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* new tests

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* template tests

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* macro TBB_USE_EXCEPTIONS

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Apply suggestions from code review

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2021-12-08 11:46:43 +03:00
Ivan Kochin 4eec89fe7a Check the swappable requirement for the parallel_sort algorithm (#656)
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-12-06 17:43:26 +03:00
مهدي شينون (Mehdi Chinoune) f5de7b039e Copy tbb.lib only with MSVC (#679) 2021-12-06 17:22:05 +03:00
Andrey Semashev b7a062e2d9 Use memalign, posix_memalign and _aligned_malloc to allocate aligned memory. (#671)
This uses the standard allocator for allocating and freeing memory with
higher alignment requirements instead of the hand-rolled implementation.

Signed-off-by: Andrey Semashev <andrey.semashev@gmail.com>
2021-12-03 16:44:04 +03:00
kboyarinov fc8717e18c Move heterogeneous extensions from preview (#672) 2021-12-03 15:20:05 +03:00
Ilya Isaev 2713d41e4c Fix incorrect definition of assignment operator in containers (#676)
* Fixed incorrect definitions of assignment operators in associative containers.

This fixes incorrect return types of assignment operators imported from
base classes. Other than copy and move assignment operators, which are
generated by the compiler even if imported with a using-declaration,
the imported operators will be returning a reference to the base class
instead of the derived class.

Fixes https://github.com/oneapi-src/oneTBB/issues/372.

Signed-off-by: Andrey Semashev <andrey.semashev@gmail.com>
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-12-02 13:02:24 +03:00
Ilya Isaev cf0a673956 collaborative_call_once: alignment with Spec 1.1 (#662)
collaborative_call_once is moved from preview. Also added conformance_collaborative_call_once test file

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-11-29 12:33:09 +03:00
Alexandra fb8ae3b97d Update RELEASE_NOTES.md (#670)
Signed-off-by: Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com
2021-11-24 16:09:49 +03:00
Pavel Kumbrasev 3ab999a0a7 Move mutexes out of preview (#666)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-11-22 11:52:52 +03:00
Alexandra 46d3acde26 Update conf.py (#664)
* Signed-off-by:Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com

* Update conf.py

* Update conf.py
2021-11-19 17:11:53 +03:00
AlexandAnton Potapov 7631793a32 Fix stack overflow protection mechanism (#553)
* Fix stack size calculation

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
Co-authored-by: Anton Potapov <anton.potapov@intel.com>
2021-11-19 15:07:25 +03:00
Alexandra 3692900c51 Update README.md (#663)
* Update README.md

* Update README.md
2021-11-18 11:34:24 +03:00
AlexandraandAlexey Veprev 25f8494f45 Installation Guide (#630)
* Installation Guide

* Update INSTALL.md

* Update README.md

* Update INSTALL.md

* Update INSTALL.md

* Update INSTALL.md

* Update INSTALL.md

* Update INSTALL.md

Co-authored-by: Alexey Veprev <alexey.veprev@intel.com>

* Update INSTALL.md

* Update README.md

* Update INSTALL.md

* Update README.md

Co-authored-by: Alexey Veprev <alexey.veprev@intel.com>
2021-11-18 11:18:41 +03:00
Sergey Zheltov 252ee0d301 CMake: fix warning 'LNK4044: unrecognized option /openmp' (#661)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2021-11-17 20:27:54 +03:00
Alexandra 7b3cb6747d New docs and update README.md (#660)
* Signed-off-by:Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com

* Update SYSTEM_REQUIREMENTS.md

* Update SYSTEM_REQUIREMENTS.md
2021-11-17 12:10:00 +03:00
Ivan Kochin bd4fb54e72 Disable the TBBbind target during the static library build (#658)
* Disable the TBBbind target during the static library build

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-11-16 21:15:11 +03:00
588c6a9f8b task_group extensions: documentation for task_group::run_and_wait(task_handle&&) method (#563)
* task_group extensions:

	- documentation for task_group::run_and_wait(task_handle&&) method

Co-authored-by: Alex <alexei.katranov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2021-11-16 16:42:02 +03:00
Alexandra b2cbc926ec Update conf.py (#652)
* Update conf.py

* static folder
2021-11-16 12:52:17 +03:00
Alexandra 7dee0fbd15 Update index.rst (#655)
Signed-off-by: Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com
2021-11-16 11:20:12 +03:00
Ivan Kochin 9052aaabd9 Remove several redundant steps inside the parallel_sort algorithm (#657)
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-11-16 09:40:53 +03:00
AndrewDeanMSandAndrew Dean 2915b9b93f CMake: add option TBBMALLOC_PROXY_BUILD (#586)
Signed-off-by: Andrew Dean <Andrew.Dean@microsoft.com>

Co-authored-by: Andrew Dean <Andrew.Dean@microsoft.com>
2021-11-12 22:57:58 +03:00
Ilya Isaev 51277f0e58 Fix typo in detail/_config.h (#645)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-11-09 18:33:27 +03:00
Julien Schueller ce47617377 Fix build with MinGW (#618)
Signed-off-by: Julien Schueller <schueller at phimeca dot com>
2021-11-09 17:14:14 +03:00
Ilya Isaev c8211a2168 Fix code coverage on macOS (#643)
Changed macro logic to let bool governor::wait_package_enabled() be called on macOS

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-11-09 15:44:36 +03:00
Ilya Isaev e82d250338 Check presence of Hugepagesize field (#594)
Don't enable HP and THP support if there is no Hugepagesize field in /proc/meminfo
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-11-02 23:02:53 +03:00
Ganael Laplanche cb885710ab Fix build on FreeBSD (#613)
__unix__ is defined on FreeBSD and makes #elif __FreeBSD__ section skipped

Signed-off-by: Ganael Laplanche <ganael.laplanche@martymac.org>
2021-11-02 16:30:59 +03:00
Alexey Veprev cf29ce8177 PR template: add signed-off-by checkbox (#638)
Signed-off-by: Veprev, Alexey alexey.veprev@intel.com
2021-11-02 16:20:36 +03:00
Alexey Veprev 8c9445dee5 CMake: add python_build target to ALL (#635)
Signed-off-by: Veprev, Alexey alexey.veprev@intel.com
2021-10-29 15:45:40 +03:00
Ivan Kochinandkboyarinov b95bbc9c9f Rvalue and constant ranges support for the tbb::parallel_sort algorithm (#605)
* Use forwarding reference for the parallel_sort overload that takes range

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
Co-authored-by: kboyarinov <konstantin.boyarinov@intel.com>
2021-10-29 11:52:42 +03:00
Alexandra 7c7be274a1 Create Bazel.md (#632) 2021-10-28 12:29:33 +03:00
Ivan Kochin 6feeba8035 Use native CMake way to detect the IPO support (#608)
* Use native CMake way to detect the IPO support

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-10-27 17:23:32 +03:00
Vertexwahn 01a68ed7b3 Improve Bazel support (#592)
* Improve Bazel build documentation
* Update Bazel version
* Add support for waitpkg to the Bazel build
2021-10-25 23:03:13 +03:00
Ilya Isaev ba947f1806 Changes in code after applying some clang-tidy check fixes (#620)
Applied fixes from clang-tidy(readability and modernize)

Signed-off-by: Ilya Isaev ilya.isaev@intel.com
2021-10-21 12:43:09 +03:00
Ilya Mishin adf44fbf25 Clang-format sudoku example and fix CI check (#629)
* Clang-format sudoku example

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* try use clang-format-10

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* one more pointer

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* check clang-format

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* check clang-format-10

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-10-20 15:10:54 +03:00
Vladislav Shchapov d439ddfb80 Fix build error if defined _WIN32_WINNT (#603)
- define NOMINMAX in the tests if not defined
2021-10-20 11:53:03 +03:00
Ivan Kochin 963dfbf770 Remove wrong "global" entry point from the tbbbind entry points list on Windows (#626)
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-10-20 10:40:13 +03:00
Ilya Isaev 15c838cea3 vars.bat: fix issue with no TBB in PATH (#622)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-10-19 16:31:53 +03:00
Alexey Veprev 1b41b7e6cc Update version to 2021.6 (#621)
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>
2021-10-18 18:37:23 +03:00
Ilya Mishin a1f53c8fa2 Remove tbbproxy library dependency from nuget package (#619)
Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-10-14 17:33:47 +03:00
Ganael Laplanche c4a42feb53 Fix FreeBSD/amd64 build on 13-STABLE and 14-CURRENT (clang >= 12.0.1) (#614)
Fix build on FreeBSD/amd64 with clang >= 12 or gcc >= 11
2021-10-14 14:11:56 +03:00
Ilya Mishin 106e08a45a Fix memory leak in sudoku example (#607)
* Fix memory leak in sudoku example

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* right macro

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove iostream

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove hardcoded value

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* do one board copy instead of three copies

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* make task_group local

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-10-14 12:30:40 +03:00
vlserov 1168c5cb83 Clang13 warnings fixing (#612)
Resolved warnings: deprecated-copy, unused-but-set-variable

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-10-13 19:14:42 +03:00
Ilya Isaev 155a9af909 vars.bat: add variable with full path to DLLs (#611)
Signed-off-by: Ilya Isaev ilya.isaev@intel.com
2021-10-13 13:23:13 +03:00
Ilya Isaev ef970eb0d9 Detect 32 bit x86 systems while adding -mwaitpkg option (#609)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-10-08 11:40:15 +03:00
Sergey Zheltov b61fd08145 CMake: disable build of tbbmalloc_proxy on Windows ARM64 (#604)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2021-10-07 19:26:03 +03:00
Felix Yan 6fad69889d Define ITT_ARCH_IA64 when undefiend (#550) 2021-10-07 09:16:16 +03:00
Anton PotapovandPavel Kumbrasev 3c20b8f0b2 Revamp left over removal (#602)
* Revamp left over removal

Signed-off-by: Anton Potapov <anton.potapov@intel.com>

Co-authored-by: Pavel Kumbrasev <pavel.kumbrasev@intel.com>
2021-10-06 12:44:31 +03:00
Ivan Kochin 70bf10c0a9 Include missed <cstdint> header to oneapi/tbb/info.h (#601)
This header is required to use `intptr_t`.
2021-10-04 18:59:40 +03:00
Alexandra 144f75fd65 Clean-up (#598) 2021-10-01 19:40:53 +03:00
Alexandra b3d63b7a7f Update conf.py (#597) 2021-10-01 17:42:30 +03:00
Alex a8206f8540 Skip leak test in test_arena_constaints with tsan (#595)
Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-10-01 13:07:21 +03:00
Anton Potapov 4ca7d964db Fixed possible buffer overrun in dynamic_link (#591)
Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2021-09-30 15:51:05 +03:00
Ilya Isaev c09c4163ca Use yield function from tbb in tbbmalloc (#590)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-09-30 09:11:34 +03:00
Vertexwahn 5ab8e5f6ea Fix spelling (contex -> context) (#593) 2021-09-30 08:37:33 +03:00
Pavel Kumbrasev f13f3ef35a Correct commit_wait in rml_monitor (#581)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-09-29 14:49:27 +03:00
Ilya Isaev d65c9b3a5f Fix test_tbb_header compiling on Windows with IntelLLVM (#589)
Fixed compilation error on Windows while compiling with IntelLLVM compiler: "#include resolved using non-portable Microsoft search rules"

Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-09-28 18:09:51 +03:00
Ilya Mishin e6162e8838 Fix comment in test_limiter_node (#585)
Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-09-24 17:43:45 +03:00
Sergey Zheltov 43169c243f CMake: fix compile options for Windows ARM64 (#579)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2021-09-16 19:18:49 +03:00
Alexandra 5d7abed881 Update index.rst (#578) 2021-09-15 12:46:54 +03:00
Anton PotapovandAlexandra f580ec8edb DOC: Migration guide: Deferred task creation (#537)
- added Deferred task creation chapter

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2021-09-14 21:53:25 +03:00
Anton Potapov c4a120705f [DOC]: Update Get Started Guide (#575)
- added code sample
2021-09-14 18:33:42 +03:00
Alexandra 3b1bc31f45 [DOC]: Update Get Started Guide (#564) 2021-09-14 16:55:00 +03:00
e8037363ac DOC: Migration guide chapter for Scheduler Bypass (#525)
* DOC: Migration guide chapter for Scheduler Bypass

Signed-off-by: Anton Potapov <anton.potapov@intel.com>

* DOC: Migration guide chapter for Scheduler Bypass

Minor code cleanups for code samples

Co-authored-by: Pavel <pavel.kumbrasev@intel.com>
Signed-off-by: Anton Potapov <anton.potapov@intel.com>

* DOC: Migration guide chapter for Scheduler Bypass

- fixed wording

Co-authored-by: Alex <alexei.katranov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

* DOC: Migration guide chapter for Scheduler Bypass

- fixed wording

* DOC: Migration guide chapter for Scheduler Bypass

- fixed code sample
- add sentence about what defer is doing

Signed-off-by: Anton Potapov <anton.potapov@intel.com>

* DOC: Migration guide chapter for Scheduler Bypass

- fixed wording

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>

Co-authored-by: Pavel <pavel.kumbrasev@intel.com>
Co-authored-by: Alex <alexei.katranov@intel.com>
Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2021-09-14 15:57:16 +03:00
Alexandra 0a57bda871 Update index.rst (#572) 2021-09-14 11:08:07 +03:00
Ekaterina Mekhnetsova 4624e4ff59 Remove old tms configurations (#571)
* Remove old tms configurations

* Update custom.js
2021-09-10 13:50:24 +03:00
Ilya Mishin 7567de93ae Workaround gcc bug in test_limiter_node (#569)
* Workaround gcc bug in test_limiter_node

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* unify workaround

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-09-07 18:29:59 +03:00
Alex 97ac8f4324 Disable RTM based tests under TSAN (#567)
* Disable RTM based tests (speculative mutexes) under TSAN

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-09-07 11:26:55 +03:00
PavelandAlex 40a9a10600 Fix memory semantics in queuing_rw_mutex (#552)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

Co-authored-by: Alex <alexei.katranov@intel.com>
2021-09-03 17:05:11 +03:00
Alexey Oralov 5d8ddb3fb6 Add PR template (#554)
Signed-off-by: Alexey Oralov alexey.oralov@intel.com
2021-09-03 09:25:41 +03:00
vlserovandpavelkumbrasev 4d3f9752d0 Performance: Avoid lock during working with multiple arenas (#562)
Synchronization order of calls function market::adjust_demand should
be made for arena, not for the market itself.

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-09-02 15:22:24 +03:00
Ekaterina Mekhnetsova 0a2b398702 Add analytics script for documentation (#561)
* Add analytics script for doc

* Update layout.html
2021-09-02 13:45:25 +03:00
Alexey Veprev 497a2b1695 Update version to 2021.5 (#559)
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>
2021-09-01 17:07:44 +03:00
Pavel 86fe3f04c1 Fix arena layout (#557)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-08-31 15:03:40 +03:00
Anton PotapovandAlex dd8f8a7826 task_group extensions run_and_wait(task_handle&&) method (#538)
* task_group extensions:

- added task_group::run_and_wait(task_handle&&) method

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
Co-authored-by: Alex <alexei.katranov@intel.com>
2021-08-31 14:51:53 +03:00
Ilya Isaev f81abcb640 Increase number of iterations to cover 'resume_node::reset' call (#551)
Increased number of iterations to have a more stable coverage of resume_node::reset() function.

Signed-off-by: Ilya Isaev ilya.isaev@intel.com
2021-08-30 13:54:46 +03:00
Ilya Mishin 6aab19f72a Cover remove_edge with successor::input_ports_type (#549)
Signed-off-by: Ilya Mishin <ilya.mishin@intel.com>
2021-08-27 12:59:13 +03:00
Alexandra a6b90fc9f5 Contribution guidelines (#506)
* Signed-off-by:Alexandra Epanchinzeva alexandra.epanchinzeva@intel.com

* Minor fixes

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2021-08-26 17:55:23 +03:00
Ivan Kochin 1ea36d9e9d Cover the constraints_threads_per_core() reserved interface by testing (#544)
* Cover the constraints_threads_per_core reserved interface by testing

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-08-25 13:12:07 +03:00
Ilya IsaevandAlex 9924f9e808 Fix static build on Windows (#543)
This patch fixes issue with reference leak reported by test_global_control and test_tbb_fork on static build.

Signed-off-by: Isaev, Ilya ilya.isaev@intel.com

Co-authored-by: Alex <alexei.katranov@intel.com>
2021-08-24 14:23:05 +03:00
Ekaterina Mekhnetsova b60c4d3631 Update conf.py (#545) 2021-08-24 10:40:49 +03:00
Ekaterina Mekhnetsova 0695d176ff DOC: Add a link to Intel cookies (#542)
* Add a link to Intel cookies

* Update syntax
2021-08-24 10:29:57 +03:00
Pavel c6045a4f6f Fix using tbb::this_task_arena::current_thread_index() with uninitilized arena (#541)
Fix using tbb::this_task_arena::current_thread_index() with uninitilized arena
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-08-23 09:48:35 +03:00
vlserov d2405e35d1 Remove unused template class tls (#536)
Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-08-18 10:46:17 +03:00
Ilya Mishin de0109bed0 Improve Flow Graph conformance tests (#410)
* continue and function node

* multifunction node

* input node

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* buffering nodes

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* new input and output messages

* service nodes

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* green CI

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* graph reset tests

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* additional reset tests

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix codestyle issues

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* copy constructor fix

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* sfinae fix

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix unique_ptr on cxx11

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* style fixes

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* copy_constructor fix

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix atomic initialization

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fid data race

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-08-12 11:29:31 +03:00
AlexandAlexandra b44f164b5c [DOC] Fix task_scheduler_handle description (#509)
* [DOC] Fix task_scheduler_hadnle description

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
2021-08-12 10:51:15 +03:00
Sergey Zheltov 1167f54bdf CMake: suppress alignment warning for ARM64-MSVC (#532)
Signed-off-by: Zheltov, Sergey1 <sergey1.zheltov@intel.com>
2021-08-11 20:39:08 +03:00
Ilya Isaev 8584c45634 Code coverage fixes (#516)
In scope of this patch TBB_BUILD and TBBMALLOC_BUILD options were added. It was done to support scenarios when we are testing without tbbmalloc. It allows us to cover place where we fail to link with tbbmalloc and start using std_cache_aligned_allocate/deallocate.

Signed-off-by: Ilya Isaev ilya.isaev@intel.com
2021-08-09 11:52:01 +03:00
Ilya Mishin 1ecde27f49 Fix inclusive language usage issues in tbbmalloc (#522)
Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-08-06 11:45:00 +03:00
vlserov 5a643c2360 GCC 11: suppress stringop-overread warning (#519)
1. Using thread_local for non-pointer types instead of tbb::detail::r1::tls
2. Replace magic-value with valid pointer

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-08-05 15:57:27 +03:00
Alexey Veprev 357c9b27fa Update version number for 2021.4 (#520)
Signed-off-by: Veprev, Alexey alexey.veprev@intel.com
2021-08-02 18:20:31 +03:00
Alex 4df48f9850 Fix a race condition in AddrRange in tbbmalloc (#518)
The change fixes a possible crash of realloc when replaced with tbbmalloc_proxy on Linux.

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-07-30 21:09:57 +03:00
Pavel 552f342b26 Add workaround for incorrect soft limit initialization (#512)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-07-30 15:59:06 +03:00
Alexandpavelkumbrasev 34c7d170ca Add heavy mix test for the scheduler (#490)
The test found a couple of issues that are also addressed in the patch

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-07-30 15:58:14 +03:00
Ivan KochinandAlexey Veprev 7ec3cf8408 Fix the HWLOC linking when it was found using pkg-config (#508)
* Use imported target instead of variables during the HWLOC search using pkg-config
* Remove redundant code + rephrase the description
* Fix the indentation
* Rework testing

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>

Co-authored-by: Alexey Veprev <alexey.veprev@intel.com>
2021-07-30 15:21:15 +03:00
Ilya Mishin a070e5f208 Fix optimization flag on icx Windows Release build (#513)
Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-07-29 15:50:48 +03:00
Michael Vitrano 7d70bb51c3 Support building for Windows ARM64 (#507)
* Support building for Windows ARM64

Signed-off-by: Michael Vitrano <michaelvitrano@gmail.com>
2021-07-26 18:23:29 +03:00
Ivan Kochin b53726aac7 Prevent linking HWLOC 2.4 with tbbbind_2_5 (#501)
* Prevent linking HWLOC 2.4 with tbbbind_2_5
* Fix typo
* Rename and extend the comment

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-07-23 14:49:49 +03:00
vlserov fcb8377bee ASAN: test_task_group timeout (#502)
Disable memory leak tests under ASAN

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-07-22 14:41:20 +03:00
Ilya Mishin dbccbee9f5 ICX compiler support on windows (#499)
* Support ICX on windows

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* clang macro

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* update compiler map

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix intptr_t

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix duplicate

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix spaces

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* fix spaces 2

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* update style

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* Update CMakeLists.txt

* Update test_openmp.cpp
2021-07-22 10:43:27 +03:00
Ivan Kochin edc30c82a1 Bind internal pinning observer lifetime to internal arena (#488)
* Bind internal pinning observer lifetime to the internal arena
* Control the tbbbind system_topology lifetime manually
* Fix entry point name
* Apply review remarks:
 * rename platform_topology to system_topology inside tbbbind
 * other minor fixes

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-07-21 23:01:03 +03:00
7941f880cb Fix build and tests of statically linked oneTBB (#492)
Fix build of libraries and tests while linking statically.

Signed-off-by: buzyaba <isaev.ameninc@gmail.com>

Co-authored-by: Alexey Veprev <alexey.veprev@intel.com>
Co-authored-by: buzyaba <isaev.ameninc@gmail.com>
2021-07-21 15:56:23 +03:00
8827ea7d1d Add export attributes + bug fixes (#351)
* Change (_WIN32 || _WIN64) to (_WIN32)

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add _MSC_VER guards around #pragma warning directives

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Tweak MUTEX_INITIALIZER to suppress warnings

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Undefine PATH_MAX before redefining to suppress warnings

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Wrap #undef PATH_MAX

Co-authored-by: Alex <alexei.katranov@intel.com>

* Add lib prefix to dll names on mingw

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Quote LINK_FLAGS and LINK_DEPENDS to avoid space in paths problem

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Move #include <cstring> outside of #if _WIN32 block

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* wchar_t everywhere

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export attributes

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Tweak export macros

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export directives to tbbmalloc

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Wrap version script arguments + Undefine __STRICT_ANSI__

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Export directives for tbbbind

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Temporarily disable def files flag

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Fix __STRICT_ANSI__ undefine

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Fix macro in spin_mutex.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export directives to task_group.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add waitpkg detection

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Tweak x86_64 detection

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Fix -U__STRICT_ANSI__ again

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Do not link with dl on mingw

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add extra include files for allocator.cpp

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export directives for version.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Move export directives macro to a separate file

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Split export directives into separate macros

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Remove tbbmalloc symbols from proxy.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Replace TBBMALLOC_EXPORT with TBB_EXPORT in tbb_allocator.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Include scalable_allocator.h in tbbmalloc.cpp

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Disable C4275 in _exception.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export directives for is_writer

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export directives for _waitable_atomic.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Create macro for tbbbind

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Include <new> in scalable_allocator.h

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add export case for Apple OS

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add VERSION and SOVERSION

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Fix warnings under MSYS2 + GCC 10.3.x

* Trying to fix Linux CI

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Remove std::this_thread::yield() dependency on Windows

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Apply suggestions + fix typo

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Add def file flags back in

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Tweak export directives mechanism

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

* Change bool to auto to prevent warnings on VS2015

Signed-off-by: Long Nguyen <nguyen.long.908132@gmail.com>

Co-authored-by: Alex <alexei.katranov@intel.com>
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
2021-07-21 10:04:02 +03:00
Alexandpavelkumbrasev a080baf996 Additional set of Thread Sanitizer related fixes (#482)
- Fix incorrect assert in concurrent_hash_map implementation
- Fix incorrect asserts in global_control implementation
- Fix exception pointer inside task_group_context
- Rework racy asserts in test_flow_graph_whitebox
- Improve test_eh_algorithm to work with sanitizers
- Disable memory limit test in test_malloc_compliance
- Add lifetime asserts in collaborative_call_once
- Rework backref space in tbbmalloc to use atomics
- Fix a lifetime issue in utils::SpinBariier
- Some tests were disabled

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-07-19 14:47:09 +03:00
Ilya Isaev 9cef57778c Workaround non-zero exit code (#496)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-07-19 09:19:45 +03:00
Ilya Isaev e279ae19cb Remove dead code for code coverage (#497)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-07-19 09:12:58 +03:00
Ilya Mishin 1098f48187 Fix failed test_limiter_node on gcc10,11 release build (#493)
Signed-off-by: ilya.mishin <ilya.mishin@intel.com>
2021-07-16 18:00:30 +03:00
Olga Malysheva a85a8bd32f Update third-party-programs.txt (#495)
Signed-off-by: Olga Malysheva <Olga.Malysheva@intel.com>
2021-07-16 16:29:00 +03:00
Ilya Isaev 35147e0021 Simplify synchronization logic in task_group_context (#462)
The current synchronization in task_group_context made by more then one atomic variable. This code hard to debug and each ThreadSanitizer report in this code usual require unreadable workaround to fix it. To improve correctness and readability of this code it was decided to rewrite synchronization using mutex.

Signed-off-by: Ilya Isaev ilya.isaev@intel.com
2021-07-16 12:03:21 +03:00
vlserov 68e075cbb9 ASAN: leak in test_arena_constraints/conformance_arena_constraints (#484)
Memory leak has been caused by ThirdParty library.
Adding LSAN suppression list for filter known issues.

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-07-14 09:10:47 +03:00
Pavel b3fb839485 Enable thread-based resumable tasks under ASan (#486)
Signed-off-by: pavelkumbrasev <pavel.kumbrasev@intel.com>
2021-07-09 15:26:02 +03:00
Vertexwahn 6164044548 Add support for Bazel build (#442)
Signed-off-by: Vertexwahn <julian.amann@tum.de>
2021-07-08 11:04:01 +03:00
Alex 8e7f9e14ba Fix internal allocator related issues (#480)
*For some reason, GCC does not instrument tbbmalloc with TSan when lto is enabled.
*Fix race in internal allocator on handler pointer initialization.
*Simplify checks in conformance_parallel_for

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-07-08 09:32:20 +03:00
Ivan Kochin a3151ce8ac Fix tests compilation on FreeBSD (#425)
* Use right affinity mask type during tests compilation on FreeBSD
* Disable priority inversion testing on FreeBSD
* Fix test_malloc_compliance compilation
* Add TODO, remove redundant blank line

Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>
2021-07-08 08:01:30 +03:00
43c1805ec6 Add thread based resumable tasks (#479)
Co-authored-by: vlserov <vladimir.serov@intel.com>
Co-authored-by: pavelkumbrasev <pavel.kumbrasev@intel.com>

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-07-07 09:11:23 +03:00
Ilya Mishin c94904e909 oneAPI pkg-config support (#452)
* oneAPI pkg-config support

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* tbb and tbb32

* remove uwp

* remove unnecessary variable

* define variable

* correct install

* remove exec_prefix

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* new path

* update vars

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* absolute paths for CMAKE_INSTALL_*DIR

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>

* remove )

Signed-off-by: Mishin, Ilya <ilya.mishin@intel.com>
2021-07-06 18:43:44 +03:00
Alexey Oralov c75ed5bf40 Update path to archive (#483)
Signed-off-by: Alexey Oralov alexey.oralov@intel.com
2021-07-06 13:38:13 +03:00
Alexey Oralov 055cc6eaa0 CI: enable publishing of documentation on pages (#473)
Signed-off-by: Aleksey Oralov <alexey.oralov@intel.com>
2021-07-06 13:05:41 +03:00
Ivan Kochin 07300f7eab Prevent vars generation conflict (#469)
Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>
2021-07-06 07:33:42 +03:00
Alexey Veprev a3a6cd638d CMake: fix path to tbb.pc.in file (#476)
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>
2021-07-05 17:23:29 +03:00
Alex 59ac78fa87 Fix flow graph tests under Thread Sanitizer (#444)
* Fix fg tests under tsan

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-07-05 11:49:17 +03:00
Pablo Romero 734f0bc0be Add support for QNX Neutrino (#440)
* Added support for QCC (QNX GNU Compiler)
* Enable source code compilation with non-Linux Unix systems with special focus on QNX.

Signed-off-by: promero <promero@mathworks.com>
2021-07-02 18:44:55 +03:00
vlserov de8bf52c4a ASAN: test_handle_perror (#472)
test_handle_perror doesn't depend on TBB library.
Only include paths are required.

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-07-02 15:13:20 +03:00
Ivan Kochin c646de018a Fix LTO flags for Visual Studio compilation with old Cmake versions(<3.13) (#471)
Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-07-01 18:22:16 +03:00
Ivan KochinandAleksei Fedotov e96dbf4b48 Upgrade from HWLOC 2.4 to HWLOC 2.5 (#448)
* Upgrade from HWLOC 2.4 to HWLOC 2.5
* Introduce tbbbind_2_5 library
* Remove tbbbind_2_4 library
* Use the HWLOC_TOPOLOGY_FLAG_RESTRICT_TO_CPUBINDING topology flag (introduces as a part of HWLOC 2.5) to restrict topology discovering to process binding
* Fix testing on Linux
* Apply review comments
* Improve wording: variable -> substring
* Use right tbbbind version for incompatible hwlocs test
* Rework option semantic
* Update README.md for CMake
* Rework readme
* Update cmake/README.md

Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2021-07-01 15:07:39 +03:00
vlserov 94b62cc1d8 ASAN: test_malloc_whitebox (#467)
Reverting ASAN fix for test_malloc_regression #415
Turn off memory leaks test in test_malloc_regression test case

Signed-off-by: Serov, Vladimir <vladimir.serov@intel.com>
2021-07-01 11:31:04 +03:00
Ilya Isaev 112076d06c Improve code coverage (#463)
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
2021-07-01 10:09:04 +03:00
kboyarinov 4a23d00235 Multiple fixes for constraints (#465)
* Fix a typo in chmap, temporary rename concept range

* Rename range concept, add workaround for Windows

* Reimplement with respect to prospective destructors

* Fix fibonacci
2021-06-30 16:22:06 +03:00
Ivan Kochin a3635ce50b Fix LTO flags on Windows for old CMake versions (#466)
* Fix LTO flags for old CMake versions
* Update cmake/README.md

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-06-30 01:01:00 +03:00
Mircho Rodozov fa944e1960 Remove arch macros checks for getSmallObjectIndex (#461)
Remove arch macros checks for getSmallObjectIndex 

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-06-29 21:09:43 +03:00
Ivan Kochin 3e4ab55091 Fix dlopen flags for loading tbbmalloc and rml (#457)
* Fix dlopen flags for loading tbbmalloc and rml
* Rework macro definition approach
* Use correct macro name

Signed-off-by: Kochin, Ivan <kochin.ivan@intel.com>
2021-06-29 09:41:39 +03:00
Alexey Oralov 67c1171696 Add build documentation to CI (#423)
Signed-off-by: Aleksey Oralov <alexey.oralov@intel.com>
2021-06-28 17:44:37 +03:00
Anton Potapov c0b91bdba9 ASAN: disable OOM test in test_malloc_compliance (#459)
Out Of Memory conditions simulated in the ReallocParam test breaking ASAN, so skip this case under it.

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-06-28 10:25:55 +03:00
Anton Potapov 3a47fb3718 ASAN: disable test_malloc_overload (#458)
- ASAN overload malloc/free, so test is no longer test TBBMalloc

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2021-06-28 10:21:31 +03:00
Anton Potapov 3a6580652d ASAN: disable tests causing OOM conditions (#456)
- do not run theses tests under ASAN :
   - test_eh_thread
   - test_malloc_new_handler

Signed-off-by: Anton Potapov <anton.potapov@intel.com>
2021-06-25 12:05:27 +03:00
Alex 2ca2a5f206 Fix leaking proxy task objects (#431)
* Fix leaking proxy task objects

Signed-off-by: Alexei Katranov <alexei.katranov@intel.com>
2021-06-25 09:15:57 +03:00
Ivan Kochin 0354fc109f Solve the issue with different incompatible HWLOC library versions in one executable (#426)
* Solve the issue with different incompatible hwlocs in one executable
* Support macOS and Windows
* Fix flags on Windows and MacOS
* Try to fix Windows compilation
* Add warning suppression
* Rename the CMake variable
* Fix the RTLD_DEEPBIND flag placement condition
* Improve naming
* Change flags logic
* Suppress MSVC 2015 warning: 'int': forcing value to bool 'true' or 'false'

Signed-off-by: Kochin Ivan <kochin.ivan@intel.com>
2021-06-23 19:45:29 +03:00
Anton PotapovandAleksei Fedotov 4386b0f0cd task_group extensions : task_handle comparison operators unit tests (#451)
* task_group extensions

- unit tests for empty check / comparison operators

Signed-off-by: Anton Potapov <anton.potapov@intel.com>

Co-authored-by: Aleksei Fedotov <aleksei.fedotov@intel.com>
2021-06-23 14:12:52 +03:00
kboyarinov 16b6a651a9 Fix error C3864 for constraints on Windows (#449)
* Fix Windows warning on constraints

* Fix whitespaces
2021-06-23 12:16:05 +03:00
1346 changed files with 118084 additions and 15657 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
8.1.1
+7
View File
@@ -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
+7
View File
@@ -0,0 +1,7 @@
---
name: Ask a question
about: Use this template for any questions
title: ''
labels: 'question'
assignees: ''
---
+32
View File
@@ -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.
+20
View File
@@ -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.
+6
View File
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
+27
View File
@@ -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'
+17
View File
@@ -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/**/*']
+38
View File
@@ -0,0 +1,38 @@
### Description
_Add a comprehensive description of proposed changes_
Fixes # - _issue number(s) if exists_
### Type of change
_Choose one or multiple, leave empty if none of the other choices apply_
_Add a respective label(s) to PR if you have permissions_
- [ ] bug fix - _change that fixes an issue_
- [ ] new feature - _change that adds functionality_
- [ ] tests - _change in tests_
- [ ] infrastructure - _change in infrastructure and CI_
- [ ] documentation - _documentation update_
### Tests
- [ ] added - _required for new features and some bug fixes_
- [ ] not needed
### Documentation
- [ ] updated in # - _add PR number_
- [ ] needs to be updated
- [ ] not needed
### Breaks backward compatibility
- [ ] Yes
- [ ] No
- [ ] Unknown
### Notify the following users
_List users with `@` to send notifications_
### Other information
+8 -4
View File
@@ -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}"
+576 -55
View File
@@ -1,4 +1,5 @@
# Copyright (c) 2021 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,106 +26,401 @@ 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: |
set -e -x -o pipefail
command -v clang-format
cp -r examples examples_formatted
find examples_formatted -regex '.*\.\(cpp\|hpp\)' -exec clang-format-9 -style=file -i {} \;
find examples_formatted -regex '.*\.\(cpp\|hpp\)' -exec clang-format -style=file -i {} \;
diff -r examples examples_formatted
python_module_test_ubuntu18-04:
runs-on: [ubuntu-18.04]
documentation:
needs: [codespell]
env:
BUILD_TYPE: oss
runs-on: [ubuntu-latest]
timeout-minutes: 10
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 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@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@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@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 *
touch .nojekyll # https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/
cp -r ../html/* .
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit --reset-author --amend -m "Update from GitHub Actions"
git push --force origin gh-pages
copyright_check:
if: ${{ github.ref != 'refs/heads/master' }}
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
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Run check
run: |
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_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
@@ -136,33 +432,158 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2016
generator: Visual Studio 15 2017
- os: windows-2025
generator: Visual Studio 18 2026
c_compiler: cl
cxx_compiler: cl
std: 14
build_type: relwithdebinfo
preview: 'ON'
job_name: windows_cl2017_cxx14_relwithdebinfo_preview=ON
- os: windows-2019
generator: Visual Studio 16 2019
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
cxx_compiler: cl
std: 17
build_type: relwithdebinfo
preview: 'OFF'
job_name: windows_cl2019_cxx17_relwithdebinfo_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 }}
@@ -172,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:
@@ -210,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:
@@ -236,29 +667,119 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2016
generator: Visual Studio 15 2017
- 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_cl2017_cxx14_relwithdebinfo_preview=ON
- os: windows-2019
generator: Visual Studio 16 2019
job_name: examples_windows_11_arm_cl2022_cxx14_relwithdebinfo_preview=ON
- os: windows-2022
generator: Visual Studio 17 2022
c_compiler: cl
cxx_compiler: cl
std: 17
build_type: relwithdebinfo
preview: 'OFF'
job_name: examples_windows_cl2019_cxx17_relwithdebinfo_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"
}
+93
View File
@@ -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}}"
+102
View File
@@ -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}}"
+42
View File
@@ -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
+36
View File
@@ -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
+89
View File
@@ -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
+189
View File
@@ -0,0 +1,189 @@
# 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.
# 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.
# DISCLAIMER: Bazel support is community-based. The maintainers do not
# 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_applicable_licenses = [":license"],
)
exports_files([
"LICENSE",
])
license(
name = "license",
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
license_text = "LICENSE.txt",
)
cc_library(
name = "tbb",
srcs = glob([
"src/tbb/*.cpp",
"src/tbb/*.h",
]) + select({
"@platforms//cpu:x86_64": glob(["src/tbb/tools_api/**/*.h"]),
"//conditions:default": [],
}),
hdrs = glob([
"include/tbb/*.h",
"include/oneapi/*.h",
"include/oneapi/tbb/*.h",
"include/oneapi/tbb/detail/*.h",
]),
copts = ["-w"] + select({
"@platforms//os:windows": [""],
"@platforms//cpu:x86_64": ["-mwaitpkg"],
"//conditions:default": [""],
}),
defines =
select({
"@platforms//cpu:x86_64": ["__TBB_NO_IMPLICIT_LINKAGE"],
"//conditions:default": [
"USE_PTHREAD",
],
}) +
select({
"@platforms//os:osx": ["_XOPEN_SOURCE"],
"//conditions:default": [],
}),
includes = [
"include",
],
linkopts =
select({
"@platforms//os:windows": [],
"@platforms//os:linux": [
"-ldl",
"-pthread",
"-lrt",
],
"//conditions:default": ["-pthread"],
}),
local_defines = select({
"@platforms//cpu:x86_64": [
"__TBB_USE_ITT_NOTIFY",
],
"//conditions:default": [],
}) + [
"__TBB_BUILD",
],
textual_hdrs = select({
"@platforms//cpu:x86_64": [
"src/tbb/tools_api/ittnotify_static.c",
],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
)
cc_library(
name = "tbbmalloc",
srcs =
glob([
"src/tbbmalloc/*.h",
"src/tbb/*.h",
"src/tbbmalloc_proxy/*.h",
]) + [
"src/tbbmalloc/backend.cpp",
"src/tbbmalloc/backref.cpp",
"src/tbbmalloc/frontend.cpp",
"src/tbbmalloc/large_objects.cpp",
"src/tbbmalloc/tbbmalloc.cpp",
],
hdrs = glob([
"include/tbb/*.h",
"include/oneapi/tbb/detail/*.h",
"include/oneapi/tbb/*.h",
]),
includes = [
"include",
],
local_defines = [
"__TBBMALLOC_BUILD",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "tbbmalloc_proxy",
srcs = [
"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",
],
)
+108
View File
@@ -0,0 +1,108 @@
# Bazel* build support
The main build system of oneTBB is CMake*.
[Bazel*](https://bazel.build/) support is community-based.
The Bazel configuration may not include recommended compiler and/or linker flags used in the official CMake configuration.
---
**NOTE**
Bazel is not recommended for use by oneTBB maintainers. Thus, it is not used internally.
---
The Bazel oneTBB build is currently only intended for a subset of oneTBB that suffices restricted use cases.
Pull requests to improve the Bazel build experience are welcome.
The standard Bazel approach to handling third-party libraries is static linking. It is the best practice within the Bazel ecosystem.
## 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:
```
example
├── .bazelrc
├── BUILD.bazel
├── main.cpp
└── WORKSPACE.bazel
```
_WORKSPACE.bazel_:
```python
load("@platforms//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "oneTBB",
branch = "master",
remote = "https://github.com/uxlfoundation/oneTBB/",
)
```
In the *WORKSPACE* file, the oneTBB GitHub* repository is fetched.
_BUILD.bazel_:
```python
cc_binary(
name = "Demo",
srcs = ["main.cpp"],
deps = ["@oneTBB//:tbb"],
)
```
The *BUILD* file defines a binary named `Demo` that has a dependency to oneTBB.
_main.cpp_:
```c++
#include "oneapi/tbb/version.h"
#include <iostream>
int main() {
std::cout << "Hello from oneTBB "
<< TBB_VERSION_MAJOR << "."
<< TBB_VERSION_MINOR << "."
<< TBB_VERSION_PATCH
<< "!" << std::endl;
return 0;
}
```
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.
## Compiler support
The Bazel build uses the compiler flag `-mwaitpkg` in non-Windows* builds.
This flag is supported by the GNU* Compiler Collection (GCC) version 9.3, Clang* 12, and newer versions of those tools.
---
**NOTE**
To use the Bazel build with earlier versions of GCC, remove `-mwaitpkg` flag as it leads to errors during compilation.
---
+208 -46
View File
@@ -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.
@@ -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)
@@ -60,6 +73,7 @@ unset(_tbb_ver_minor)
include(CheckCXXCompilerFlag)
include(GNUInstallDirs)
include(CMakeDependentOption)
# ---------------------------------------------------------------------------------------------------------
# Handle C++ standard version.
@@ -84,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)
@@ -98,14 +117,50 @@ option(TBB_STRICT "Treat compiler warnings as errors" ON)
option(TBB_WINDOWS_DRIVER "Build as Universal Windows Driver (UWD)" OFF)
option(TBB_NO_APPCONTAINER "Apply /APPCONTAINER:NO (for testing binaries for Windows Store)" OFF)
option(TBB4PY_BUILD "Enable tbb4py build" OFF)
option(TBB_CPF "Enable preview features of the library" 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_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" ${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)
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()
@@ -116,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)
@@ -164,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)
# -------------------------------------------------------------------
@@ -177,6 +252,20 @@ foreach(FILE_WITH_EXTRA_TARGETS ${FILES_WITH_EXTRA_TARGETS})
include(${FILE_WITH_EXTRA_TARGETS})
endforeach()
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()
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)
if (EXISTS ${TBB_COMPILER_SETTINGS_FILE})
include(${TBB_COMPILER_SETTINGS_FILE})
@@ -184,54 +273,87 @@ 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")
find_package(TBB REQUIRED)
else()
add_subdirectory(src/tbb)
if (NOT "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips")
if (TBB_BUILD)
add_subdirectory(src/tbb)
endif()
if (TBBMALLOC_BUILD)
add_subdirectory(src/tbbmalloc)
add_subdirectory(src/tbbmalloc_proxy)
if (APPLE)
message(STATUS "TBBBind build target is disabled due to unsupported environment")
else()
add_subdirectory(src/tbbbind)
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()
@@ -239,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")
@@ -249,11 +383,28 @@ if (TBB_BENCH)
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_STL}" STREQUAL "c++_shared")
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
@@ -266,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
View File
@@ -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
+134
View File
@@ -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
+50
View File
@@ -0,0 +1,50 @@
<!--
******************************************************************************
* 
* 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.
*******************************************************************************/-->
# How to Contribute
As an open source project, we welcome community contributions to oneAPI Threading Building Blocks (oneTBB). This document explains how to participate in project conversations, log bugs and enhancement requests, and submit code patches to the project.
## 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/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/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://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/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 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.
+147
View File
@@ -0,0 +1,147 @@
# Install
## Install from Release Packages
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
At the command prompt, type:
```
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. |
| `-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
To build the system, run:
```
cmake --build . <options>
```
Some useful build options:
- `--target <target>` - specific target, "all" is default.
- `--config <Release|Debug>` - build configuration, applicable only for multi-config generators such as Visual Studio generator.
### Install and Pack oneTBB
---
**NOTE**
Be careful about installing prefix. It defaults to `/usr/local` on UNIX* and `c:/Program Files/${PROJECT_NAME}` on Windows* OS.
You can define custom `CMAKE_INSTALL_PREFIX` during configuration:
```
cmake -DCMAKE_INSTALL_PREFIX=/my/install/prefix ..
```
---
Installation can also be done using:
```
cmake --install <project-binary-dir>
```
Special ``--install`` target can alternatively be used for installation, e.g. ``make install``.
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](https://github.com/uxlfoundation/oneTBB/blob/master/python/README.md).
If you want to install specific components after configuration and build, run:
```bash
cmake -DCOMPONENT=<component> [-DBUILD_TYPE=<build-type>] -P cmake_install.cmake
```
Simple packaging using CPack is supported.
The following commands allow you to create a simple portable package that includes header files, libraries, and integration files for CMake:
```bash
cmake <options> ..
cpack
```
### Installation from vcpkg
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/uxlfoundation/oneTBB.git
cd oneTBB
# Create binary directory for out-of-source build
mkdir build && cd build
# Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
cmake -DCMAKE_INSTALL_PREFIX=/tmp/my_installed_onetbb -DTBB_TEST=OFF ..
# Build
cmake --build .
# Install
cmake --install .
# Well done! Your installed oneTBB is in /tmp/my_installed_onetbb
```
#### Multi-Configuration Generators
The following example demonstrates how to install oneTBB for multi-configuration generators such as Visual Studio*.
Choose the configuration during the build and install steps:
```batch
REM Do our experiments in %TMP%
cd %TMP%
REM Clone oneTBB repository
git clone https://github.com/uxlfoundation/oneTBB.git
cd oneTBB
REM Create binary directory for out-of-source build
mkdir build && cd build
REM Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
cmake -DCMAKE_INSTALL_PREFIX=%TMP%\my_installed_onetbb -DTBB_TEST=OFF ..
REM Build "release with debug information" configuration
cmake --build . --config relwithdebinfo
REM Install "release with debug information" configuration
cmake --install . --config relwithdebinfo
REM Well done! Your installed oneTBB is in %TMP%\my_installed_onetbb
```
+141
View File
@@ -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 |
+26
View File
@@ -0,0 +1,26 @@
# 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.
# 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.
# DISCLAIMER: Bazel support is community-based. The maintainers do not
# use Bazel internally. The Bazel build can have security risks or
# optimization gaps.
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")
+55 -35
View File
@@ -1,51 +1,71 @@
# oneAPI Threading Building Blocks
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE.txt) [![oneTBB CI](https://github.com/oneapi-src/oneTBB/actions/workflows/ci.yml/badge.svg)](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">
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE.txt) [![oneTBB CI](https://github.com/uxlfoundation/oneTBB/actions/workflows/ci.yml/badge.svg)](https://github.com/uxlfoundation/oneTBB/actions/workflows/ci.yml?query=branch%3Amaster)
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/blue?icon=github)](https://github.com/uxlfoundation/oneTBB/discussions)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9125/badge)](https://www.bestpractices.dev/projects/9125)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/uxlfoundation/oneTBB/badge)](https://securityscorecards.dev/viewer/?uri=github.com/uxlfoundation/oneTBB)
[![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20oneTBB%20Guru-006BFF)](https://gurubase.io/g/onetbb)
[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/30373.svg?label=coverity-lin)](https://scan.coverity.com/projects/oneapi-src-onetbb)
[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/32544.svg?label=coverity-win)](https://scan.coverity.com/projects/uxlfoundation-onetbb)
oneAPI Threading Building Blocks (oneTBB) lets you easily write parallel C++ programs that take
full advantage of multicore performance, that are portable, composable and have future-proof scalability.
oneTBB is a flexible C++ library that simplifies the work of adding parallelism
to complex applications, even if you are not a threading expert.
The library lets you easily write parallel programs that take full advantage of the multi-core performance. Such programs are portable,
composable and have a future-proof scalability. oneTBB provides you with functions, interfaces, and classes to parallelize and scale the code.
All you have to do is to use the templates.
The library differs from typical threading packages in the following ways:
* oneTBB enables you to specify logical parallelism instead of threads.
* oneTBB targets threading for performance.
* oneTBB is compatible with other threading packages.
* oneTBB emphasizes scalable, data parallel programming.
* oneTBB relies on generic programming.
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 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]( https://software.intel.com/en-us/articles/intel-oneapi-threading-building-blocks-release-notes) and
[System Requirements](https://software.intel.com/en-us/articles/intel-oneapi-threading-building-blocks-system-requirements).
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://software.intel.com/en-us/oneapi-tbb-documentation)
* [Migrating from TBB to oneTBB](https://software.intel.com/content/www/us/en/develop/documentation/onetbb-documentation/top/onetbb-developer-guide/migrating-from-threading-building-blocks-tbb.html)
* README for build system: [cmake/README.md](cmake/README.md)
* [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 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/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) or start a topic on the
[oneTBB forum](https://community.intel.com/t5/Intel-oneAPI-Threading-Building/bd-p/oneapi-threading-building-blocks).
See our [documentation](./SUPPORT.md) to learn how to request help.
## How to Contribute
To contribute to oneTBB, please open a GitHub pull request (preferred) or send us a patch by e-mail.
We welcome community contributions, so check our [Contributing Guidelines](CONTRIBUTING.md)
to learn more.
Please use the sign-off line at the end of the patch.
Your signature certifies that you wrote the patch or
otherwise have the right to pass it on as an open-source patch.
The rules are pretty simple:
if you can certify the https://developercertificate.org then you just add a line to every git commit message:
```
Signed-off-by: Name Surname <user@email.com>
```
Use your real name (sorry, no pseudonyms or anonymous contributions).
If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.
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.
## Security
To report security issues please go to https://intel.com/security.
## Engineering team contacts
* [E-mail us.](mailto:inteltbbdevelopers@intel.com)
------------------------------------------------------------------------
Intel and the Intel logo are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or other countries.
\* Other names and brands may be claimed as the property of others.
\* All names and brands may be claimed as the property of others.
+466
View File
@@ -0,0 +1,466 @@
<!--
******************************************************************************
* 
* 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 2023.1 Release Notes
## :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.
## :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&#269;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.
## :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
- 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)).
- Memory corruption in some rare cases when passing big messages in a flow graph (GitHub* [#639](https://github.com/oneapi-src/oneTBB/issues/639)).
- Possible deadlock in a throwable flow graph node with a lightweight policy. The lightweight policy is now ignored for functors that can throw exceptions (GitHub* [#420](https://github.com/oneapi-src/oneTBB/issues/420)).
- 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
- 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
View File
@@ -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
View File
@@ -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).
+88
View File
@@ -0,0 +1,88 @@
<!--
******************************************************************************
* 
* 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.
*******************************************************************************/-->
# System Requirements <!-- omit in toc -->
This document provides details about hardware, operating system, and software prerequisites for the oneAPI Threading Building Blocks (oneTBB).
## Table of Contents <!-- omit in toc -->
- [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) 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:
- Microsoft* Windows* 10
- Microsoft* Windows* 11
- Microsoft* Windows* Server 2019
- 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
- Microsoft* Visual C++ 14.2 (Microsoft* Visual Studio* 2019, Windows* OS only)
- 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
View File
@@ -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)
+81
View File
@@ -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.
+19
View File
@@ -0,0 +1,19 @@
# 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.
# 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.
# DISCLAIMER: Bazel support is community-based. The maintainers do not
# use Bazel internally. The Bazel build can have security risks or
# optimization gaps.
# WORKSPACE marker file needed by Bazel
+225 -91
View File
@@ -1,29 +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.
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)
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_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
### Prerequisites
* CMake >= 3.1
## Configure, Build, and Test
### Preparation
In order to perform out-of-source build you have to 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
@@ -37,22 +50,47 @@ 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 isn't applicable for multi-config generators, e.g. for Visual Studio generator).
- `-G <generator>` - specify particular project generator. See `cmake --help` for details.
- `-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 two versions: `tbbbind` and `tbbbind_2_0`. 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.x.
> **_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.
To enable the TBBBind library build or special tests that performed inside the HWLOC environment, please specify the following CMake variables:
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
- `CMAKE_HWLOC_<HWLOC_VER>_LIBRARY_PATH` - path to the corresponding HWLOC version shared library on Linux or path to `.lib` file on Windows.
- `CMAKE_HWLOC_<HWLOC_VER>_INCLUDE_PATH` - path to the corresponding HWLOC version includes directory.
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:
Windows requires one additional variable for correct TBBBind library building:
- `CMAKE_HWLOC_<HWLOC_VER>_LIBRARY_PATH` - path to the corresponding HWLOC version shared library on Linux* OS or path to `.lib` file on Windows* OS
- `CMAKE_HWLOC_<HWLOC_VER>_INCLUDE_PATH` - path to the corresponding HWLOC version including directory
---
**NOTE:** Automatic HWLOC searching requires CMake version 3.6 or higher.
---
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` variable used above can be replaced with one of the two values: `1_11` for the `tbbbind` library configuration and `2` for the `tbbbind_2_0` 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 a single build session.
---
**TIP**
Specify the `TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH` to turn off the HWLOC library's automatic search.
---
### Build
@@ -61,21 +99,28 @@ cmake --build . <options>
```
Some useful options:
- `--target <target>` - specific target, "all" is default.
- `--config <Release|Debug>` - build configuration, applicable only for multi-config 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.
Binaries are placed to `./<compiler-id>_<compiler-ver>_cxx<stdver>_<build-type>` (for example, `./gnu_4.8_cxx11_release`)
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 Compiler: just 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.
* GCC/Clang: specify `-m32` during the configuration: `CXXFLAGS=-m32 cmake ..` or `cmake -DCMAKE_CXX_FLAGS=-m32 ..`
* Any other compiler which builds for 64-bit by default: specify 32-bit compiler key during the configuration as above.
* **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.
* **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 a 32-bit compiler key during the configuration as above.
#### Windows specific builds (CMake 3.15 or newer is required)
#### Windows* OS-Specific Builds
* Dynamic linkage with CRT: default behavior, can be explicitly specified by setting `CMAKE_MSVC_RUNTIME_LIBRARY` to `MultiThreadedDLL` or `MultiThreadedDebugDLL`.
---
**NOTE**
The following builds require CMake version 3.15 or higher.
---
* **Dynamic linkage with C Runtime Library (CRT)**. The default behavior can be explicitly specified by setting `CMAKE_MSVC_RUNTIME_LIBRARY` to `MultiThreadedDLL` or `MultiThreadedDebugDLL`.
```bash
cmake .. # dynamic linkage is used by default
```
@@ -85,51 +130,160 @@ cmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL ..
```bash
cmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL -DCMAKE_BUILD_TYPE=Debug ..
```
* Static linkage with CRT: set `CMAKE_MSVC_RUNTIME_LIBRARY` to `MultiThreaded` or `MultiThreadedDebug`.
* **Static linkage with CRT**. Set `CMAKE_MSVC_RUNTIME_LIBRARY` to `MultiThreaded` or `MultiThreadedDebug`.
```bash
cmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ..
```
```bash
cmake -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug -DCMAKE_BUILD_TYPE=Debug ..
```
* Windows 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` to apply the `/APPCONTAINER:NO` option during the compilation (used for testing).
---
_Note: set `TBB_NO_APPCONTAINER` to `ON` in order to apply `/APPCONTAINER:NO` option during the compilation (used for testing)._
```bash
cmake -DCMAKE_SYSTEM_NAME:STRING=WindowsStore -DCMAKE_SYSTEM_VERSION:STRING=10.0 ..
```
* Universal Windows Driver build: set `TBB_WINDOWS_DRIVER` to `ON` and use static linkage with CRT (see above).
* **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
Using default ('all') target:
To build a test, use the default target ``all``:
```
cmake --build .
```
or using specific test target:
Or use a specific test target:
```
cmake --build . --target <test> # e.g. test_version
```
#### Run test
#### Run Test
Using CTest:
You can run a test by using CTest:
```bash
ctest
```
or using 'test' target:
Or by using the ``test`` target:
```bash
cmake --build . --target test # currently doesn't work on Windows
cmake --build . --target test # currently does not work on Windows* OS
```
## 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
@@ -139,7 +293,7 @@ make -j
ctest -V
```
## Valgrind memcheck - configure, build and run
## Valgrind Memcheck - Configure, Build, and Run
### Prerequisites
* Valgrind tool executable
@@ -151,7 +305,9 @@ cmake -DTBB_VALGRIND_MEMCHECK=ON ..
make -j memcheck-<test name> # or memcheck-all to scan all tests
```
## Test specification (Doxygen)
## Test Specification
Use Doxygen* to generate oneTBB test specification:
```bash
mkdir build
@@ -160,35 +316,12 @@ cmake -DTBB_TEST_SPEC=ON ..
make test_spec
```
## Intallation and packaging
## TBBConfig - Integration of Binary Packages
**NOTE: be careful about installation: avoid commands like `make install` unless you fully understand the consequences.**
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.
The following install components are supported:
- `runtime` - oneTBB runtime package (core shared libraries and `.dll` files on Windows).
- `devel` - oneTBB development package (header files, CMake integration files, library symbolic links and `.lib` files on Windows).
- `tbb4py` - [oneTBB Module for Python](#onetbb-python-module-support).
How to install specific components after configuration and build:
```bash
cmake -DCOMPONENT=<component> [-DBUILD_TYPE=<build-type>] -P cmake_install.cmake
```
Simple packaging using CPack is supported.
The following commands allow to create a simple portable package which includes header files, libraries and integration files for CMake:
```bash
cmake <options> ..
cpack
```
## 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.
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.
@@ -203,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:
@@ -221,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
@@ -238,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
@@ -269,16 +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
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.
+14 -4
View File
@@ -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.
@@ -31,10 +31,20 @@ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
tbb_remove_compile_flag(-Werror)
endif()
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) on relevant processors
if (NOT "${CMAKE_OSX_ARCHITECTURES}" MATCHES "^arm64$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|AMD64)") # OSX systems are 64-bit only
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm)
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
if (CMAKE_OSX_ARCHITECTURES)
set(_tbb_target_architectures "${CMAKE_OSX_ARCHITECTURES}")
else()
set(_tbb_target_architectures "${CMAKE_SYSTEM_PROCESSOR}")
endif()
if ("${_tbb_target_architectures}" MATCHES "(x86_64|amd64|AMD64)") # OSX systems are 64-bit only
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)
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)
+82 -13
View File
@@ -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,15 +13,40 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (APPLE)
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 "")
elseif (APPLE)
set(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)
set(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})
# For correct ucontext.h structures layout
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -D_XOPEN_SOURCE)
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.
@@ -38,22 +64,65 @@ 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 "(x86|AMD64)")
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()
set(TBB_COMMON_LINK_LIBS dl)
# 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 (ANDROID_PLATFORM)
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)
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()
# Enabling LTO on Android causes the NDK bug.
# NDK throws the warning: "argument unused during compilation: '-Wa,--noexecstack'"
if (NOT ANDROID_PLATFORM)
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
# -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 (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>)
# TBB malloc settings
set(TBBMALLOC_LIB_COMPILE_FLAGS -fno-rtti -fno-exceptions)
+73 -5
View File
@@ -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.
@@ -12,7 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (APPLE)
if (MINGW)
set(TBB_LINK_DEF_FILE_FLAG "")
set(TBB_DEF_FILE_PREFIX "")
elseif (APPLE)
set(TBB_LINK_DEF_FILE_FLAG -Wl,-exported_symbols_list,)
set(TBB_DEF_FILE_PREFIX mac${TBB_ARCH})
@@ -32,12 +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 "(x86|AMD64)")
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()
set(TBB_COMMON_LINK_LIBS dl)
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)
@@ -47,16 +84,47 @@ 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)
if ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips")
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -DTBB_TEST_LOW_WORKLOAD $<$<CONFIG:DEBUG>:-mxgot>)
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -DTBB_TEST_LOW_WORKLOAD $<$<CONFIG:DEBUG>:-fPIE -mxgot>)
set(TBB_TEST_LINK_FLAGS ${TBB_TEST_LINK_FLAGS} $<$<CONFIG:DEBUG>:-pie>)
endif()
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
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)
+8 -6
View File
@@ -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()
+11 -5
View File
@@ -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,14 +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})
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)")
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm -mwaitpkg)
endif()
+38 -9
View File
@@ -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.
@@ -19,10 +20,12 @@ set(TBB_DEF_FILE_PREFIX win${TBB_ARCH})
# TODO: consider use of CMP0092 CMake policy.
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
# Warning suppression C4324: structure was padded due to alignment specifier
set(TBB_WARNING_LEVEL $<$<NOT:$<CXX_COMPILER_ID:Intel>>:/W4> $<$<BOOL:${TBB_STRICT}>:/WX>)
# Warning suppression C4324: structure was padded due to alignment specifier
set(TBB_WARNING_SUPPRESS /wd4324)
set(TBB_TEST_COMPILE_FLAGS /bigobj)
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} /bigobj)
if (MSVC_VERSION LESS_EQUAL 1900)
# Warning suppression C4503 for VS2015 and earlier:
# decorated name length exceeded, name was truncated.
@@ -30,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)
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)
@@ -40,7 +49,7 @@ endif()
if (WINDOWS_STORE OR TBB_WINDOWS_DRIVER)
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} /D_WIN32_WINNT=0x0A00)
set(TBB_COMMON_LINK_FLAGS /NODEFAULTLIB:kernel32.lib /INCREMENTAL:NO)
set(TBB_COMMON_LINK_FLAGS -NODEFAULTLIB:kernel32.lib -INCREMENTAL:NO)
set(TBB_COMMON_LINK_LIBS OneCore.lib)
endif()
@@ -55,7 +64,7 @@ if (WINDOWS_STORE)
string(REGEX REPLACE "WindowsApp.lib" "" CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES}")
if (TBB_NO_APPCONTAINER)
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} /APPCONTAINER:NO)
set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -APPCONTAINER:NO)
endif()
endif()
@@ -69,7 +78,27 @@ 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()
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/GL>)
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:/LTCG /INCREMENTAL:NO>)
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)
endif()
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-flto>)
else()
set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/GL>)
set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-LTCG> $<$<NOT:$<CONFIG:Debug>>:-INCREMENTAL:NO>)
endif()
set(TBB_OPENMP_FLAG /openmp)
set(TBB_OPENMP_NO_LINK_FLAG TRUE) # TBB_OPENMP_FLAG will be used only on compilation but not on linkage
+18
View File
@@ -0,0 +1,18 @@
# Copyright (c) 2021 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(${CMAKE_CURRENT_SOURCE_DIR}/cmake/compilers/GNU.cmake)
# Remove dl library not present in QNX systems
unset(TBB_COMMON_LINK_LIBS)
+60 -30
View File
@@ -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,11 +35,14 @@ 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})
set(_tbb_pc_lib_name tbb)
set(_prefix_for_pc_file "\${pcfiledir}/../../")
set(_includedir_for_pc_file "\${prefix}/include")
set(TBB_COMPONENTS_BIN_VERSION "
set(_tbb_bin_version ${tbb_gen_cfg_TBB_BINARY_VERSION})
set(_tbbmalloc_bin_version ${tbb_gen_cfg_TBBMALLOC_BINARY_VERSION})
@@ -50,37 +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 "
@@ -88,13 +115,16 @@ 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()
set(TBB_HANDLE_BIN_VERSION "
+22 -16
View File
@@ -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_4)
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,23 +53,20 @@ 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
NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH
)
find_package(PkgConfig QUIET)
if (PKG_CONFIG_FOUND)
pkg_search_module(HWLOC hwloc)
if (HWLOC_FOUND)
if (HWLOC_VERSION VERSION_LESS 2)
set(TBBBIND_LIBRARY_NAME tbbbind)
elseif(HWLOC_VERSION VERSION_LESS 2.4)
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.5)
set(TBBBIND_LIBRARY_NAME tbbbind_2_0)
else()
set(TBBBIND_LIBRARY_NAME tbbbind_2_4)
set(TBBBIND_LIBRARY_NAME tbbbind_2_5)
endif()
endif()
endif()
endif()
+11 -3
View File
@@ -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()
+5 -2
View File
@@ -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
View File
@@ -14,6 +14,7 @@
# Add code signing as post-install step.
if (DEFINED TBB_SIGNTOOL)
file(TO_CMAKE_PATH "${TBB_SIGNTOOL}" TBB_SIGNTOOL)
install(CODE "
file(GLOB_RECURSE FILES_TO_SIGN \${CMAKE_INSTALL_PREFIX}/*${CMAKE_SHARED_LIBRARY_SUFFIX})
execute_process(COMMAND ${TBB_SIGNTOOL} \${FILES_TO_SIGN} ${TBB_SIGNTOOL_ARGS})
+6 -1
View File
@@ -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*" )
+31
View File
@@ -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()
+16 -2
View File
@@ -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}")
@@ -34,5 +43,10 @@ if (NOT ${FLAG_DISPLAY_NAME})
"please try another compiler or omit TBB_SANITIZE variable")
endif()
set(TBB_TESTS_ENVIRONMENT ${TBB_TESTS_ENVIRONMENT}
"TSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/cmake/suppressions/tsan.suppressions"
"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}")
+3 -4
View File
@@ -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}")
+2
View File
@@ -0,0 +1,2 @@
# LSAN suppression for ltdl library known issue.
leak:libltdl.so
+4
View File
@@ -0,0 +1,4 @@
# TSAN suppression for known issues.
# Possible data race during ittnotify initialization. Low impact.
race:__itt_nullify_all_pointers
race:__itt_init_ittlib
+37 -7
View File
@@ -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)
+34
View File
@@ -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 "")
+49 -19
View File
@@ -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.
@@ -18,27 +18,57 @@ macro(tbb_remove_compile_flag flag)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_OPTIONS ${_tbb_compile_options})
unset(_tbb_compile_options)
if (CMAKE_CXX_FLAGS)
string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
string(REGEX REPLACE "(^|[ \t\r\n]+)${flag}($|[ \t\r\n]+)" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()
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 (TBB_INSTALL)
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
FRAMEWORK
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT runtime
OPTIONAL)
install(TARGETS ${target}
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
NAMELINK_ONLY
COMPONENT devel)
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
INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE
)
elseif (TBB_IPO_FLAGS)
target_compile_options(${target} PRIVATE ${TBB_IPO_COMPILE_FLAGS})
if (COMMAND target_link_options)
target_link_options(${target} PRIVATE ${TBB_IPO_LINK_FLAGS})
else()
target_link_libraries(${target} PRIVATE ${TBB_IPO_LINK_FLAGS})
endif()
endif()
endmacro()
+10 -2
View File
@@ -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}
Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

+20
View File
@@ -0,0 +1,20 @@
.. _Get_Started_Guide:
Get Started with |full_name|
=============================
.. include:: /GSG/intro_gsg.rst
To start using oneTBB, follow the next steps:
*********************************************
#. 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>`.
+7
View File
@@ -0,0 +1,7 @@
.. _installation:
Installation
============
See the `installation instructions <https://github.com/uxlfoundation/oneTBB/blob/master/INSTALL.md>`_
that will help you to install |short_name| successfully.
+80
View File
@@ -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.
+29
View File
@@ -0,0 +1,29 @@
|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 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 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.
.. figure:: /GSG/Images/how-oneTBB-works.png
:scale: 70%
:align: center
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.
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|.
+145
View File
@@ -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.
+49
View File
@@ -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.
+7
View File
@@ -0,0 +1,7 @@
.. _System_Requirements:
System Requirements
*******************
|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>`_.
+36
View File
@@ -0,0 +1,36 @@
#===============================================================================
# Copyright (C) 2022 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.
#===============================================================================
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+34
View File
@@ -0,0 +1,34 @@
# How to build oneTBB documentation
Our documentation is written in restructured text markup (.rst) and built using [Sphinx](http://www.sphinx-doc.org/en/master/).
This document explains how to build oneTBB documentation locally.
## Prerequisites
- Python 3.7.0 or higher
- Sphinx
## Build documentation
Do the following to generate HTML output of the documentation:
1. Clone oneTBB repository:
```
git clone https://github.com/uxlfoundation/oneTBB.git
```
2. Go to the `doc` folder:
```
cd oneTBB/doc
```
3. Run in the command line:
```
make html
```
That's it! Your built documentation is located in the ``build/html`` folder.
+37
View File
@@ -0,0 +1,37 @@
window.MathJax = {
TeX: {
Macros: {
src: '\\operatorname{src}',
srclayer: '\\operatorname{src\\_layer}',
srciter: '\\operatorname{src\\_iter}',
srciterc: '\\operatorname{src\\_iter\\_c}',
weights: '\\operatorname{weights}',
weightslayer: '\\operatorname{weights\\_layer}',
weightsiter: '\\operatorname{weights\\_iter}',
weightspeephole: '\\operatorname{weights\\_peephole}',
weightsprojection: '\\operatorname{weights\\_projection}',
bias: '\\operatorname{bias}',
dst: '\\operatorname{dst}',
dstlayer: '\\operatorname{dst\\_layer}',
dstiter: '\\operatorname{dst\\_iter}',
dstiterc: '\\operatorname{dst\\_iter\\_c}',
diffsrc: '\\operatorname{diff\\_src}',
diffsrclayer: '\\operatorname{diff\\_src\\_layer}',
diffsrciter: '\\operatorname{diff\\_src\\_iter}',
diffsrciterc: '\\operatorname{diff\\_src\\_iter\\_c}',
diffweights: '\\operatorname{diff\\_weights}',
diffweightslayer: '\\operatorname{diff\\_weights\\_layer}',
diffweightsiter: '\\operatorname{diff\\_weights\\_iter}',
diffweightspeephole: '\\operatorname{diff\\_weights\\_peephole}',
diffweightsprojection: '\\operatorname{diff\\_weights\\_projection}',
diffbias: '\\operatorname{diff\\_bias}',
diffdst: '\\operatorname{diff\\_dst}',
diffdstlayer: '\\operatorname{diff\\_dst\\_layer}',
diffdstiter: '\\operatorname{diff\\_dst\\_iter}',
diffdstiterc: '\\operatorname{diff\\_dst\\_iter\\_c}',
diffgamma: '\\operatorname{diff\\_\\gamma}',
diffbeta: '\\operatorname{diff\\_\\beta}',
workspace: '\\operatorname{workspace}'
}
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 467 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

+13
View File
@@ -0,0 +1,13 @@
/* override table width restrictions */
@media screen and (min-width: 767px) {
.wy-table-responsive table td {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}
.wy-table-responsive {
overflow: visible !important;
}
}
+367
View File
@@ -0,0 +1,367 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# 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('.'))
SOURCE_DIR = os.path.dirname(__file__)
LATEX_DIR = os.path.join(SOURCE_DIR, '_latex')
PREAMBLE_FILE = os.path.join(LATEX_DIR, 'preamble.tex')
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'UXL Foundation Contributors'
author = u''
# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u''
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.imgmath',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx_design'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['main/_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
#master_doc = 'main/title_main'
master_doc = 'index'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
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.
# 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'
if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
rst_prolog = """
.. |full_name| replace:: Intel\ |reg|\ oneAPI Threading Building Blocks (oneTBB)
.. |short_name| replace:: oneTBB
.. |product| replace:: oneTBB
.. |reg| unicode:: U+000AE
.. |copy| unicode:: U+000A9
.. |toolkit| replace:: Intel\ |reg|\ oneAPI Toolkit (oneAPI Kit)
.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler
"""
else:
rst_prolog = """
.. |full_name| replace:: oneAPI Threading Building Blocks (oneTBB)
.. |short_name| replace:: oneTBB
.. |product| replace:: oneTBB
.. |reg| unicode:: U+000AE
.. |copy| unicode:: U+000A9
.. |toolkit| replace:: Intel\ |reg|\ oneAPI Toolkit (oneAPI Kit)
.. |dpcpp| replace:: Intel\ |reg|\ oneAPI DPC++/C++ Compiler
"""
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme = 'sphinx_book_theme'
if BUILD_TYPE == 'dita':
html_theme_options = {
'repository_url': 'https://github.com/uxlfoundation/oneTBB',
'path_to_docs': 'doc',
'repository_branch': 'master'
}
else:
html_theme_options = {
'repository_url': 'https://github.com/uxlfoundation/oneTBB',
'path_to_docs': 'doc',
'use_issues_button': True,
'use_edit_page_button': True,
'repository_branch': 'master',
}
# 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".
html_static_path = ['_static']
if BUILD_TYPE == 'oneapi' or BUILD_TYPE == 'dita':
html_context = {
'css_files': [
'_static/theme_overrides.css', # override wide tables in RTD theme
],
}
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.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'sphinx-infodevdoc'
# -- Options for LaTeX output ------------------------------------------------
#latex_engine = 'xelatex'
#PDF_TITLE = 'Information Development Template'
#
#with open(PREAMBLE_FILE, 'r', encoding='utf-8') as f:
# PREAMBLE = f.read()
#
#with open(TITLE_PAGE_FILE, 'r', encoding='utf-8') as f:
# TITLE_PAGE = f.read().replace('<PDF_TITLE>', PDF_TITLE)
#
#
#latex_elements = {
# # The paper size ('letterpaper' or 'a4paper').
# #
# 'extraclassoptions': 'openany,oneside',
# 'babel' : '\\usepackage[english]{babel}',
# 'papersize': 'a4paper',
# 'releasename':" ",
# # Sonny, Lenny, Glenn, Conny, Rejne, Bjarne and Bjornstrup
# # 'fncychap': '\\usepackage[Lenny]{fncychap}',
# 'fncychap': '',
# #'fontpkg': '\\usepackage{amsmath,amsfonts,amssymb,amsthm}',
#
# 'figure_align':'htbp',
# # The font size ('10pt', '11pt' or '12pt').
# #
# 'pointsize': '12pt',
#
# # Additional stuff for the LaTeX preamble.
# #
# 'preamble': PREAMBLE,
#
# 'maketitle': TITLE_PAGE,
# # Latex figure (float) alignment
# #
# # 'figure_align': 'htbp',
# 'sphinxsetup': \
# 'hmargin={0.7in,0.7in}, vmargin={1in,1in}, \
# verbatimwithframe=true, \
# TitleColor={rgb}{0,0.686,0.941}, \
# HeaderFamily=\\rmfamily\\bfseries, \
# InnerLinkColor={rgb}{0,0.686,0.941}, \
# OuterLinkColor={rgb}{0,0.686,0.941}',
#
# 'tableofcontents':' '
#}
#
#latex_logo = '_latex/intel_logo.png'
## Grouping the document tree into LaTeX files. List of tuples
## (source start file, target name, title,
## author, documentclass [howto, manual, or own class]).
#latex_documents = [
# (master_doc, 'sphinx-infodev.tex', u'sphinx-infodev Documentation',
# u'Intel', 'manual'),
#]
#breathe_projects = { #todd-mod
# project: "../doxygen/xml"
#}
#breathe_default_project = project
# Setup the exhale extension
#exhale_args = { #todd-mod
# # These arguments are required
# "containmentFolder": "./api",
# "rootFileName": "library_root.rst",
# "rootFileTitle": "Library API",
# "doxygenStripFromPath": "..",
# "fullApiSubSectionTitle": 'Full API'
#}
# -- Options for manual page output ------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation',
[author], 1)
]
# -- Options for Texinfo output ----------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'sphinx-infodev', u'sphinx-infodev Documentation',
author, 'sphinx-infodev', 'One line description of project.',
'Miscellaneous'),
]
# -- Options for Epub output -------------------------------------------------
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''
# A unique identification for the text.
#
# epub_uid = ''
# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']
# -- Extension configuration -------------------------------------------------
# -- Options for intersphinx extension ---------------------------------------
# Example configuration for intersphinx: refer to the Python standard library.
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}
+15
View File
@@ -0,0 +1,15 @@
|full_name|
===========
.. include:: index/index_intro.rst
The following are some important topics for the ``novice user``:
* :ref:`Get_Started_Guide` gives you a brief explanation of what oneTBB is.
* :ref:`Benefits` describes how |short_name| differs from typical threading packages.
* :ref:`Package_Contents` describes dynamic library files and header files for Windows*, Linux*, and macOS* operating systems used in |short_name|.
.. include:: index/useful_topics.rst
.. include:: index/toctree.rst
+5
View File
@@ -0,0 +1,5 @@
.. _index_intro:
This document contains information about |short_name|.
It is a flexible performance library that let you break computation into parallel running tasks.
+52
View File
@@ -0,0 +1,52 @@
.. _toctree:
.. toctree::
:caption: About
:hidden:
:maxdepth: 1
/main/intro/help_support
/main/intro/notation
/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
:hidden:
:maxdepth: 1
/GSG/get_started
/GSG/system_requirements
/GSG/installation
/GSG/next_steps
/GSG/integrate
/GSG/samples
.. toctree::
:maxdepth: 3
:hidden:
:caption: Developer Guide
/main/tbb_userguide/title
.. toctree::
:maxdepth: 3
:hidden:
:caption: Developer Reference
/main/reference/reference
.. toctree::
:maxdepth: 3
:hidden:
:caption: Specification
/main/specification/source/index
+5
View File
@@ -0,0 +1,5 @@
.. _Usefull_Topics:
The following is an important topic for the ``experienced user``:
:ref:`Migration_Guide` describes how to migrate from TBB to oneTBB.
+1
View File
@@ -0,0 +1 @@
{% extends "!layout.html" %}
+68
View File
@@ -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()
+88
View File
@@ -0,0 +1,88 @@
.. _Benefits:
|short_name| Benefits
=====================
|full_name| is a library that helps you leverage multi-core performance
without having to be a threading expert. Typically you can improve
performance for multi-core processors by implementing the key points
explained in the early sections of the Developer Guide. As your
expertise grows, you may want to dive into more complex subjects that
are covered in advanced sections.
There are a variety of approaches to parallel programming, ranging from
using platform-dependent threading primitives to exotic new languages.
The advantage of oneTBB is that it works at a higher level than raw
threads, yet does not require exotic languages or compilers. You can use
it with any compiler supporting ISO C++. The library differs from
typical threading packages in the following ways:
- **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
that are close to the hardware. Direct programming with threads
forces you to efficiently map logical tasks onto threads. In
contrast, the oneTBB run-time library automatically maps logical
parallelism onto threads in a way that makes efficient use of
processor resources.
- **oneTBB targets threading for performance**. Most general-purpose
threading packages support many different kinds of threading, such as
threading for asynchronous events in graphical user interfaces. As a
result, general-purpose packages tend to be low-level tools that
provide a foundation, not a solution. Instead, oneTBB focuses on the
particular goal of parallelizing computationally intensive work,
delivering higher-level, simpler solutions.
- **oneTBB is compatible with other threading packages.** Because the
library is not designed to address all threading problems, it can
coexist seamlessly with other threading packages.
- **oneTBB emphasizes scalable, data parallel programming**. Breaking a
program up into separate functional blocks, and assigning a separate
thread to each block is a solution that typically does not scale well
since typically the number of functional blocks is fixed. In
contrast, oneTBB emphasizes *data-parallel* programming, enabling
multiple threads to work on different parts of a collection.
Data-parallel programming scales well to larger numbers of processors
by dividing the collection into smaller pieces. With data-parallel
programming, program performance increases as you add processors.
- **oneTBB relies on generic programming**. Traditional libraries
specify interfaces in terms of specific types or base classes.
Instead, oneAPI Threading Building Blocks uses generic programming.
The essence of generic programming is writing the best possible
algorithms with the fewest constraints. The C++ Standard Template
Library (STL) is a good example of generic programming in which the
interfaces are specified by *requirements* on types. For example, C++
STL has a template function ``sort`` that sorts a sequence abstractly
defined in terms of iterators on the sequence. The requirements on
the iterators are:
- Provide random access
- The expression ``*i<*j`` is true if the item pointed to by
iterator ``i`` should precede the item pointed to by iterator
``j``, and false otherwise.
- The expression ``swap(*i,*j)`` swaps two elements.
Specification in terms of requirements on types enables the template to
sort many different representations of sequences, such as vectors and
deques. Similarly, the oneTBB templates specify requirements on types,
not particular types, and thus adapt to different data representations.
Generic programming enables oneTBB to deliver high performance
algorithms with broad applicability.
Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

+427
View File
@@ -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
+15
View File
@@ -0,0 +1,15 @@
.. _help_support:
Getting Help and Support
========================
.. container:: section
.. rubric:: Getting Technical Support
:class: sectiontitle
For general information about |short_name| technical support, product
updates, user forums, FAQs, tips and tricks and other support
questions, see `oneTBB Support <https://github.com/uxlfoundation/oneTBB/blob/master/SUPPORT.md>`_.
+35
View File
@@ -0,0 +1,35 @@
.. _intro:
Introduction
============
|full_name| is a library that supports scalable parallel programming using
standard ISO C++ code. It does not require special languages or
compilers. It is designed to promote scalable data parallel programming.
Additionally, it fully supports nested parallelism, so you can build
larger parallel components from smaller parallel components. To use the
library, you specify tasks, not threads, and let the library map tasks
onto threads in an efficient manner.
Many of the library interfaces employ generic programming, in which
interfaces are defined by requirements on types and not specific types.
The C++ Standard Template Library (STL) is an example of generic
programming. Generic programming enables oneTBB to be flexible yet
efficient. The generic interfaces enable you to customize components to
your specific needs.
.. note::
|full_name| requires C++11 standard compiler support.
The net result is that oneTBB enables you to specify parallelism far
more conveniently than using raw threads, and at the same time can
improve performance.
+72
View File
@@ -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.
+106
View File
@@ -0,0 +1,106 @@
.. _notation:
Notational Conventions
======================
The following conventions may be used in this document.
.. container:: tablenoborder
.. list-table::
:header-rows: 1
* - Convention
- Explanation
- Example
* - \ *Italic*
- Used for introducing new terms, denotation of terms, placeholders, or titles of manuals.
- The filename consists of the *basename* and the *extension*.
* - \ ``Monospace``
- Indicates directory paths and filenames, commands and command line options, function names, methods, classes, data structures in body text, source code.
- \ ``ippsapi.h`` \ ``\alt\include`` Use the okCreateObjs() function to... \ ``printf("hello, world\n");``
* - [ ]
- Items enclosed in brackets are optional.
- Fa[c] Indicates Fa or Fac.
* - { \| }
- Braces and vertical bars indicate the choice of one item from a selection of two or more items.
- X{K \| W \| P} Indicates XK, XW, or XP.
* - "[" "]" "{" | " }" "|"
- Writing a metacharacter in quotation marks negates the syntactical meaning stated above; | the character is taken as a literal.
- "[" X "]" [ Y ] Denotes the letter X enclosed in brackets, optionally followed by the letter Y.
* - ...
- The ellipsis indicates that the previous item can be repeated several times.
- \ ``filename`` ... Indicates that one or more filenames can be specified.
* - ,...
- The ellipsis preceded by a comma indicates that the previous item can be repeated several times, | separated by commas.
- \ ``word`` ,... Indicates that one or more words can be specified. If more than one word is specified, the words are comma-separated.
.. container:: section
Class members are summarized by informal class declarations that
describe the class as it seems to clients, not how it is actually
implemented. For example, here is an informal declaration of class
``Foo``:
::
class Foo {
public:
int x();
int y;
~Foo();
};
The actual implementation might look like:
::
namespace internal {
class FooBase {
protected:
int x();
};
class Foo_v3: protected FooBase {
private:
int internal_stuff;
public:
using FooBase::x;
int y;
};
}
typedef internal::Foo_v3 Foo;
The example shows two cases where the actual implementation departs
from the informal declaration:
- ``Foo`` is actually a typedef to ``Foo_v3``.
- Method ``x()`` is inherited from a protected base class.
- The destructor is an implicit method generated by the compiler.
The informal declarations are intended to show you what you need to
know to use the class without the distraction of irrelevant clutter
particular to the implementation.
+111
View File
@@ -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.
+31
View File
@@ -0,0 +1,31 @@
.. _testing_approach:
Testing Approach
================
There are four main types of errors/hazards you can encounter in the development of libraries for parallelism:
* Interface correspondence to specification
* Memory errors
* Data race
* 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 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.
Race conditions and deadlocks are the most complicated errors.
They are covered by:
* **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 regression test to guarantee the detection of such issues in the future.
Continuous Integration triggers all the tests on each commit. This ensures that:
* Issues are detected, starting from the early development phase and up to the moment of integration of changes into the library.
* The highest quality of the library is maintained even in such error-prone domains as parallelism.
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 KiB

+82
View File
@@ -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>`
@@ -0,0 +1,163 @@
.. _concurrent_lru_cache:
concurrent_lru_cache
====================
.. note::
To enable this feature, define the ``TBB_PREVIEW_CONCURRENT_LRU_CACHE`` macro to 1.
A Class Template for Least Recently Used cache with concurrent operations.
.. contents::
:local:
:depth: 1
Description
***********
A ``concurrent_lru_cache`` container maps keys to values with the ability
to limit the number of stored unused values. For each key, there is at most one item
stored in the container.
The container permits multiple threads to concurrently retrieve items from it.
The container tracks which items are in use by returning a proxy
``concurrent_lru_cache::handle`` object that refers to an item instead of its value.
Once there are no ``handle`` objects holding reference to an item, it is considered unused.
The container stores all the items that are currently in use plus a limited
number of unused items. Excessive unused items are erased according to
least recently used policy.
When no item is found for a given key, the container calls the user-specified
``value_function_type`` object to construct a value for the key, and stores that value.
The ``value_function_type`` object must be thread-safe.
API
***
Header
------
.. code:: cpp
#include "oneapi/tbb/concurrent_lru_cache.h"
Synopsis
--------
.. code:: cpp
namespace oneapi {
namespace tbb {
template <typename Key, typename Value, typename ValueFunctionType = Value (*)(Key)>
class concurrent_lru_cache {
public:
using key_type = Key;
using value_type = Value;
using pointer = value_type*;
using const_pointer = const value_type*;
using reference = value_type&;
using const_reference = const value_type&;
using value_function_type = ValueFunctionType;
class handle {
public:
handle();
handle( handle&& other );
~handle();
handle& operator=( handle&& other );
operator bool() const;
value_type& value();
}; // class handle
concurrent_lru_cache( value_function_type f, std::size_t number_of_lru_history_items );
~concurrent_lru_cache();
handle operator[]( key_type key );
}; // class concurrent_lru_cache
} // namespace tbb
} // namespace oneapi
Member Functions
----------------
.. cpp:function:: concurrent_lru_cache( value_function_type f, std::size_t number_of_lru_history_items );
**Effects**: Constructs an empty cache that can keep up to ``number_of_lru_history_items``
unused values, with a function object ``f`` for constructing new values.
-------------------------------------------------------
.. cpp:function:: ~concurrent_lru_cache();
**Effects**: Destroys the ``concurrent_lru_cache``. Calls the destructors of the stored elements and
deallocates the used storage.
The behavior is undefined in case of concurrent operations with ``*this``.
-------------------------------------------------------
.. cpp:function:: handle operator[]( key_type k );
**Effects**: Searches the container for an item that corresponds to the given key.
If such an item is not found, the user-specified function object is called to
construct a value that is inserted into the container.
**Returns**: a ``handle`` object holding reference to the matching value.
Member Objects
--------------
``handle`` class
^^^^^^^^^^^^^^^^
**Member Functions**
.. cpp:function:: handle();
**Effects**: Constructs a ``handle`` object that does not refer to any value.
--------------------------------------------------
.. cpp:function:: handle( handle&& other );
**Effects**: Transfers the reference to the value stored in ``concurrent_lru_cache``
from ``other`` to the newly constructed object. Upon completion,
``other`` no longer refers to any value.
---------------------------------------------------
.. cpp:function:: ~handle();
**Effects**: Releases the reference (if it exists) to a value stored in ``concurrent_lru_cache``.
The behavior is undefined for concurrent operations with ``*this``.
---------------------------------------------------
.. cpp:function:: handle& operator=( handle&& other );
**Effects**: Transfers the reference to a value stored in ``concurrent_lru_cache`` from ``other``
to ``*this``. If existed, the previous reference held by ``*this`` is released. Upon
completion ``other`` no longer refers to any value.
**Returns**: a reference to ``*this``.
---------------------------------------------------
.. cpp:function:: operator bool() const;
**Returns**: ``true`` if ``*this`` holds reference to a value, ``false`` otherwise.
---------------------------------------------------
.. cpp:function:: value_type& value();
**Returns**: a reference to a ``value_type`` object stored in ``concurrent_lru_cache``.
The behavior is undefined if ``*this`` does not refer to any value.
@@ -0,0 +1,104 @@
.. _constructors_for_fg_nodes:
Constructors for Flow Graph nodes
=================================
.. note::
To enable this feature, define the ``TBB_PREVIEW_FLOW_GRAPH_FEATURES`` macro to 1.
.. contents::
:local:
:depth: 1
Description
***********
The "Helper Functions for Expressing Graphs" feature adds a set of new constructors
that can be used to construct a node that ``follows`` or ``precedes`` a set of nodes.
Where possible, the constructors support Class Template Argument Deduction (since C++17).
API
***
Header
------
.. code:: cpp
#include <oneapi/tbb/flow_graph.h>
Syntax
------
.. code:: cpp
// continue_node
continue_node(follows(...), Body body, Policy = Policy());
continue_node(precedes(...), Body body, Policy = Policy());
continue_node(follows(...), int number_of_predecessors, Body body, Policy = Policy());
continue_node(precedes(...), int number_of_predecessors, Body body, Policy = Policy());
// function_node
function_node(follows(...), std::size_t concurrency, Policy = Policy());
function_node(precedes(...), std::size_t concurrency, Policy = Policy());
// input_node
input_node(precedes(...), body);
// multifunction_node
multifunction_node(follows(...), std::size_t concurrency, Body body);
multifunction_node(precedes(...), std::size_t concurrency, Body body);
// async_node
async_node(follows(...), std::size_t concurrency, Body body);
async_node(precedes(...), std::size_t concurrency, Body body);
// overwrite_node
explicit overwrite_node(follows(...));
explicit overwrite_node(precedes(...));
// write_once_node
explicit write_once_node(follows(...));
explicit write_once_node(precedes(...));
// buffer_node
explicit buffer_node(follows(...));
explicit buffer_node(precedes(...));
// queue_node
explicit queue_node(follows(...));
explicit queue_node(precedes(...));
// priority_queue_node
explicit priority_queue_node(follows(...), const Compare& comp = Compare());
explicit priority_queue_node(precedes(...), const Compare& compare = Compare());
// sequencer_node
sequencer_node(follows(...), const Sequencer& s);
sequencer_node(precedes(...), const Sequencer& s);
// limiter_node
limiter_node(follows(...), std::size_t threshold);
limiter_node(precedes(...), std::size_t threshold);
// broadcast_node
explicit broadcast_node(follows(...));
explicit broadcast_node(precedes(...));
// join_node
explicit join_node(follows(...), Policy = Policy());
explicit join_node(precedes(...), Policy = Policy());
// split_node
explicit split_node(follows(...));
explicit split_node(precedes(...));
// indexer_node
indexer_node(follows(...));
indexer_node(precedes(...));
See Also
********
:ref:`follows_precedes`
+195
View File
@@ -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.
+73
View File
@@ -0,0 +1,73 @@
.. _custom_mutex_chmap:
The customizing mutex type for ``concurrent_hash_map``
======================================================
.. note::
To enable this feature, define the ``TBB_PREVIEW_CONCURRENT_HASH_MAP_EXTENSIONS`` macro to 1.
.. contents::
:local:
:depth: 1
Description
***********
oneTBB ``concurrnent_hash_map`` class uses reader-writer mutex
to provide thread safety and avoid data races for insert, lookup, and erasure operations. This feature adds an extra template parameter
for ``concurrent_hash_map`` that allows to customize the type of the reader-writer mutex.
API
***
Header
------
.. code:: cpp
#include <oneapi/tbb/concurrent_hash_map.h>
Synopsis
--------
.. code:: cpp
namespace oneapi {
namespace tbb {
template <typename Key, typename T,
typename HashCompare = tbb_hash_compare<Key>,
typename Allocator = tbb_allocator<std::pair<const Key, T>>,
typename Mutex = spin_rw_mutex>
class concurrent_hash_map {
using mutex_type = Mutex;
};
} // namespace tbb
} // namespace oneapi
Type requirements
-----------------
The type of the mutex passed as a template argument for ``concurrent_hash_map`` should
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;
**Returns**: ``true`` if the ``scoped_lock`` object acquires the mutex as a writer, ``false`` otherwise.
The behavior is undefined if the ``scoped_lock`` object does not acquire the mutex.
``oneapi::tbb::spin_rw_mutex``, ``oneapi::tbb::speculative_spin_rw_mutex``, ``oneapi::tbb::queuing_rw_mutex``, ``oneapi::tbb::null_rw_mutex``,
and ``oneapi::tbb::rw_mutex`` meet the requirements above.
.. rubric:: Example
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.
.. 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
Loaded 100 of 1346 files, more files were not shown because too many files have changed in this diff. Show more