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
8
votes
1 answer

Parallel more than one nested loops with tbb

What is the best way to parallel three nested independent loops with tbb? for(int i=0; i<100; i++){ for(int j=0; j<100; j++){ for(int k=0; k<100; k++){ printf("Hello World \n"); } } }
user3562182
  • 365
  • 1
  • 5
  • 8
8
votes
0 answers

how to get Threaded Building Blocks working in Ubuntu 14.04

I want to get TBB working, but I'm having a little difficulty getting the compiling to work on Ubuntu 14.04. I think it is likely a problem with setting the location of libraries for the compiler. I installed TBB using the following command: sudo…
d3pd
  • 7,935
  • 24
  • 76
  • 127
8
votes
2 answers

Improving OpenCV performance Android - fast object tracking

I am trying to implement a fast object tracking app on Android My logic is as follows Remove all colours except the desired colour range. Smooth image using GaussianBlur Find largest radius Circle with HoughCircles The app sort of works OK but…
Ryan Heitner
  • 13,119
  • 6
  • 77
  • 119
8
votes
1 answer

Thread building block library vc11_ui?

I recently downloaded TBB41_20130613 (current release for Windows at this time), and I noticed that there are folders for vc11 and vc11_ui bin/lib folders. As far as I can tell, both have the same libraries (file names are the same), but they are…
helloworld922
  • 10,801
  • 5
  • 48
  • 85
8
votes
3 answers

Atomic doubles/floats in Intel TBB

According to the documentation, an atomic supports T that is of an integral type, enumeration type, or a pointer type. Does Intel TBB support floats/doubles officially? I have seen some patches here and by Raf Schietekat here, which might/might not…
drselee
  • 81
  • 2
7
votes
3 answers

CMake project fails to find shared library

I am using CMake to build a cross platform project. For the moment I am trying to run it on Linux. I have recently added a project for running tests, but it will not run because it cannot find one of the shared libraries, specifically…
larsjr
  • 665
  • 7
  • 17
7
votes
3 answers

Implementation of Concurrent Queue + map in c++

I am not very good at data structures, so this might be very silly question. I am looking for a way to implement a hybrid behavior of queue + maps. I am currently using tbb::concurrent_bounded_queue (documented at Intel's developer zone) from…
Kapil Sharma
  • 1,412
  • 1
  • 15
  • 19
7
votes
3 answers

Fast inter-thread communication mechanism

I need a fast inter-thread communication mechanism for passing work (void*) from TBB tasks to several workers which are in running/blocking operations. Currently I'm looking into using pipe()+libevent. Is there a faster and more elegant alternative…
Stan
  • 71
  • 1
  • 1
  • 2
7
votes
4 answers

How to parallelize std::partition using TBB

Does anyone have any tips for efficiently parallelizing std::partition using TBB? Has this been done already? Here is what I'm thinking: if the array is small, std::partition it (serial) and return else, treat the array as 2 interleaved arrays…
atb
  • 1,412
  • 1
  • 14
  • 30
7
votes
1 answer

Bug in tbb::concurrent_unordered_multimap? Entries get lost even if single-threaded

My understanding is that tbb::concurrent_unordered_multimap should behave like std::unordered_multimap if I am using only one thread. However, in this example, it does not: #include "tbb/concurrent_unordered_map.h" #include #include…
mrks
  • 8,033
  • 1
  • 33
  • 62
7
votes
3 answers

How to multithread "tail call" recursion using TBB

I am trying to use tbb to multi-thread an existing recursive algorithm. The single-thread version uses tail-call recursion, structurally it looks something like this: void my_func() { my_recusive_func (0); } bool doSomeWork (int i, int& a, int&…
atb
  • 1,412
  • 1
  • 14
  • 30
7
votes
6 answers

High-performance Math library for .NET /C# and Java

We currently have a high-performance scientific application written in C++ that makes use of Intel Math Kernel Library. We are considering writing a benchmark application written in Java and .NET/C# to compare the performance difference. To do that,…
sivabudh
  • 31,807
  • 63
  • 162
  • 228
6
votes
2 answers

concurrent_vector for 2d array

I am currently trying to represent a 2D array using tbb::concurrent_vector. This 2d array will be accessed by a lot of different threads and thats why I want it to handle parallel accesses the most efficiently possible. I came up with 2…
6
votes
1 answer

Multithreading with C++ API

i am trying to parallel my program using OpenMP and sometimes i feels that i am reaching a dead end. I would like to share variables in a function member that i defined (and initialized) in the class. If i understood correctly, it is not possible…
Eagle
  • 3,362
  • 5
  • 34
  • 46
6
votes
2 answers

TBB: Possible to get Thread IDs?

I have a very simple parallel_for loop tbb::parallel_for(tbb::blocked_range(0, values.size()), [&](tbb::blocked_range r) { for (int i = r.begin(); i < r.end(); ++i) { values[i] = std::sin(i *…
easythrees
  • 1,530
  • 3
  • 16
  • 43
1 2
3
51 52