{"id":18570,"date":"2025-03-19T17:49:59","date_gmt":"2025-03-19T17:49:59","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=18570"},"modified":"2025-08-11T13:53:40","modified_gmt":"2025-08-11T13:53:40","slug":"improve-performance-of-concurrent-code","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=18570","title":{"rendered":"Parallelize without own threading (oneTBB)"},"content":{"rendered":"<h2>oneTBB<\/h2>\n<p>The library abstracts all the thread handling from you, like the task scheduler and its thread pool.<\/p>\n<p><b>Features<\/b> (selection)<\/p>\n<ul>\n<li>tbb:task_group: Run tasks in parallel, waiting for them.<\/li>\n<li>tbb::parallel_for: Run a for-loop in parallel.<\/li>\n<li>tbb:flow::graph: Run tasks in parallel, following the DAG.<\/li>\n<\/ul>\n<p>If you want to run tasks in a local scope and not in the global one you can use tbb::task_arena.<\/p>\n<p>Specification: <a href=\"https:\/\/oneapi-spec.uxlfoundation.org\/specifications\/oneapi\/latest\/elements\/onetbb\/source\/nested-index\">uxlfoundation.org<\/a><\/p>\n<hr>\n<h2>Alternatives<\/h2>\n<ul>\n<li>OpenMP<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>oneTBB The library abstracts all the thread handling from you, like the task scheduler and its thread pool. Features (selection)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[63],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18570"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18570"}],"version-history":[{"count":14,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18570\/revisions"}],"predecessor-version":[{"id":18983,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18570\/revisions\/18983"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18570"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}