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.

From Wikipedia:

Intel Threading Building Blocks (also known as TBB) is a C++ template library developed by Intel Corporation for writing software programs that take advantage of multi-core processors. The library consists of data structures and algorithms that allow a programmer to avoid some complications arising from the use of native threading packages such as POSIX threads, Windows threads, or the portable Boost Threads in which individual threads of execution are created, synchronized, and terminated manually.

Instead the library abstracts access to the multiple processors by allowing the operations to be treated as "tasks", which are allocated to individual cores dynamically.

Threading Building Blocks Homepage

Intel® Threading Building Blocks Tutorial

770 questions
6
votes
1 answer

How to make Intel TBB multifunction_node with dynamic number of ports?

I'm new with Intel TBB library. As you can see my question is related to tbb::flow::graph. I need to implement logic like: User draws graph with some logic blocks. Every block(node) could have unlimited connections(edges) so every block(node) could…
Max Pashkov
  • 404
  • 1
  • 3
  • 12
6
votes
1 answer

Thread Building Blocks: Deadlocks because all threads used up

In the Intel thread building blocks framework, how does one ensure that all threads are not busy waiting for other threads to complete. Consider for example the following code, #include #include #include #include…
ssb
  • 7,422
  • 10
  • 36
  • 61
6
votes
1 answer

TBB with fixed number of threads for one task, and default for others

I want to execute a for-loop in parallel (using TBB) over a set of blocks, where each block will be processed using a user-supplied function. Normally, I would do this using tbb::parallel_for(). For various reasons, I want to be able to limit the…
foxcub
  • 2,517
  • 2
  • 27
  • 27
6
votes
1 answer

OpenCV TBB IPP OpenMP functions

Is there a list of functions/methods of OpenCV that have been optimized with IPP and/or TBB and/or OpenMP?
user3566188
  • 115
  • 5
6
votes
2 answers

tbb concurrent hash map find & insert

I am currently using tbb's concurrent hash map to perform concurrent insertions into a hash map. Each key is a string and a value is a vector of integers. I would like to achieve the following: during insertions, if the key does not exist, I insert…
NewToAndroid
  • 581
  • 7
  • 25
6
votes
1 answer

Does tbb::concurrent_unordered_map::unsafe_erase invalidate any existing iterators?

I see that tbb::concurrent_unordered_map hews pretty close to std::unordered_map while being safe for concurrency. I also know that unsafe_erase is not concurrent-safe with insert etc. The iterator docs also state that any existing iterators are…
Glen Low
  • 4,379
  • 1
  • 30
  • 36
6
votes
1 answer

How to install opencv with tbb enabled using mingw

How to install Opencv with TBB enabled? I tried the following: 1) Downloaded the TBB package. 2) Build using the below command mingw32-make compiler=gcc arch=ia32 runtime=mingw default 3) I set the Environmental variable path as…
2vision2
  • 4,933
  • 16
  • 83
  • 164
6
votes
2 answers

How to enable C++11 compiler on visual studio 2010 express edition?

I am using tbb::parallel_for function which make use of lambdas. I am getting syntax errors with the following code: void parallel_relax( Class object, std::vector verList ) { tbb::parallel_for (blocked_range(0, verList.size()),…
Sumanth
  • 595
  • 3
  • 14
  • 39
6
votes
1 answer

OS X: convert .dylib to .a/.o (dynamic to static)?

Suppose I've read this caveat, and I still want to use TBB as a statically-linked library. (Pretend I'm working in an environment where users aren't allowed to create their own dylibs.) But I don't really want to rewrite the TBB makefile to generate…
Quuxplusone
  • 23,928
  • 8
  • 94
  • 159
5
votes
2 answers

Intel TBB: pool of graphs

I have a data processing model which is made of many chains of algorithms processing data chunks. Each chain is a graph of algorithms, which I implemented with the TBB graph class. Now I would like to have something like a "pool of graphs", i.e. a…
rmbianchi
  • 6,241
  • 6
  • 26
  • 27
5
votes
1 answer

using TBB for non-parallel tasks

I want to get a thread-pool behavior using TBB. But whenever I read documents about TBB they always talk about parallel-for, parallel-dowhile etc. In contrast what I need is a main thread to assign tasks to a thread pool so those tasks will be…
Dula
  • 1,404
  • 1
  • 14
  • 29
5
votes
1 answer

What is oneAPI and how does it compare to TBB?

We've been using TBB for years and I see when upgrading, we're taken to a oneAPI TBB page now instead. Does oneAPI TBB replace the traditional TBB? Are both versions being maintained or is the standalone TBB now deprecated? Trying to determine which…
dromodel
  • 9,581
  • 12
  • 47
  • 65
5
votes
3 answers

Linking to TBB libraries with CMake

I have tbb downloaded and placed in my repository directory: > tree deps/tbb/ -d deps/tbb/ ├── bin ├── cmake │   └── templates ├── include │   ├── serial │   │   └── tbb │   └── tbb │   ├── compat │   ├── internal │   └── machine └──…
Megidd
  • 7,089
  • 6
  • 65
  • 142
5
votes
2 answers

Learning Intel's TBB

Could anyone recommend good book about Intel's threading library and how to use it?
smallB
  • 16,662
  • 33
  • 107
  • 151
5
votes
2 answers

How to completely switch off threading in TBB code

Note: this is NOT a duplicate of this quesiton. Given a complex software parallelized with TBB, how do I completely switch off threading? I'm aware of the task_scheduler_init: int nthreads = tbb::task_scheduler_init::default_num_threads(); const…
Dmitry Mikushin
  • 1,478
  • 15
  • 16