Questions tagged [tbb]
Intel Threading Building Blocks (also known as TBB) is an open-source portable C++ template library for writing software programs that take advantage of multi-core processors.
792
questions
1
vote
1
answer
156
views
Thread pool design
I have a design question about thread pool. Consider the following code:
int main() {
auto po = std::execution::par_unseq;
// If Parallel STL uses TBB as the backend, I think the thread pool
/...
0
votes
1
answer
27
views
Automate "Set the oneAPI Environment" every time when I start VSCode
I find out that I have to CTRL+SHIFT+P > Intel oneAPI: Initialize environment variables every time when I start up VSCode. Otherwise there are build errors "fatal error: oneapi/tbb.h: No such ...
0
votes
1
answer
65
views
C++23 tbb:parallel_reduce with std::multiplies as reduction
I want to multiplies all the elements of a vector. However, the following code snippet
long doulbe sum = parallel_reduce(
blocked_range<long double>(0, sum1.size()), 1.0L /* Identity for ...
0
votes
0
answers
54
views
Compilation Error using TBB: inlining failed in call to ‘always_inline’ [duplicate]
I want to use the TBB library for my Project, but the compilation fails with this error:
/usr/lib/gcc/x86_64-linux-gnu/12/include/waitpkgintrin.h: In function ‘void tbb::detail::r1::prolonged_pause()’:...
0
votes
0
answers
37
views
g++ not picking up tbb library during linking [duplicate]
I installed libtbb
~/work$ sudo find / -name "libtbb.*"
/usr/lib/x86_64-linux-gnu/libtbb.so
/usr/lib/x86_64-linux-gnu/libtbb.so.2
Version of g++
$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~...
0
votes
1
answer
102
views
Is Intel TBB concurrent vector of doubles lock-free?
I am writing C++ multithreaded code using GCC C++20 on Intel Broadwell XEONs or AMD EPYC 7551s, Intel TBB, and Pagmo2 libraries for optimization problems. If I declare concurrent_vector<double> ...
0
votes
0
answers
35
views
C++ TBB: How to run multiple `tbb::task_arena` in parallel?
I have a performance critical lambda function p which calculates something and writes its result to an external data structure:
class Foo {
...
std::vector<int> v;
auto p = [&]() {
...
0
votes
0
answers
75
views
Uninstal TBB, "Threading Building Blocks"
ERROR: Cannot uninstall 'TBB'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
cara menghapus ...
0
votes
0
answers
51
views
How to eliminate the overhead of utilizing threadpools in nested for-loops
I am trying to multithread the p2-loop in the inner loop of the following nested loops in C++. I don't want the outer loop to be multithreaded due to shared data.
// OUTER LOOP
for ( int l = 0; l < ...
0
votes
0
answers
53
views
The implementation of tbb::parallel_for gives a sigsev segmentation error
I was compiling a program named autoremesher on Ubuntu 22.04. It's an open source project, and I was requested to remove it's GUI. That I did and removed it's dependency from QT framework, except for ...
1
vote
1
answer
96
views
How to link a library in Rtools on Windows?
I am trying to use a library (Intel TBB) in my R package on Windows, but not sure how to write makevars.win.
I have Rtools installed, and there are the library under include:
C:\RBuildTools\4.3\x86_64-...
1
vote
0
answers
28
views
Update Node from OneTBB Library
Is there a way to have joiner/indexer or composite node with an update policy? The update policy has the requirement:
The output is ready once at least one port receives a value.
Mechanism to check ...
0
votes
1
answer
58
views
How do I reference the instance of tbb::task_group_context which is being passed in through the tbb::parallel_for loop
tbb::task_group_context tg;
SomeClass someObject;
tbb:: parallel_for(tbb::blocked_range<size_t>(0, num, grainSize),
someObject,
tbb::simple_partitioner(),
...
0
votes
0
answers
83
views
Deadlock between tbb::task_group and thread barrier
In my application i am using Intel OneAPI TBB for parallelism. I am isolating work on NUMA nodes using task_arenas. I have a couple of parallel tasks I need to execute on each NUMA node for which I am ...
-1
votes
1
answer
208
views
Error installing tbb on MacOS using homebrew
I'm trying to install tbb on MacOS using Homebrew, and I get the following error message:
==> cmake --build build/shared
Last 15 lines from /Users/inspectorgloomy/Library/Logs/Homebrew/tbb/02.cmake:...