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
5
votes
2 answers

Getting Thread Building Blocks (Intel TBB) running on Linux with gcc

I'm trying to build some tests for threading building blocks. Unfortunately, I'm unable to configure the tbb library. The linker cannot find the library tbb. I've tried running the scripts in bin directory which has not helped. I've even tried…
Malice
  • 1,457
  • 16
  • 32
5
votes
1 answer

trouble linking INTEL tbb library

I read these threads: Getting Thread Building Blocks (Intel TBB) running on Linux with gcc unable to link Intel TBB library with libtbb in /usr/lib g++ can't find headers even when it's specified g++ cannot find header file g++ can't find headers…
aquagremlin
  • 3,515
  • 2
  • 29
  • 51
5
votes
1 answer

Performance of map pattern in multithreaded program lower than expected (4x speedup vs 8x)

I'm getting started in multithreaded programming so please excuse me if the following seems obvious. I am adding multithreading to an image processing program and the speedup isn't exactly the one I expected. I'm currently getting a speedup of 4x…
5
votes
5 answers

Multi-Core Programming. Boost's MPI, OpenMP, TBB, or something else?

I am totally a novice in Multi-Core Programming, but I do know how to program C++. Now, I am looking around for Multi-Core Programming library. I just want to give it a try, just for fun, and right now, I found 3 APIs, but I am not sure which one…
Karl
  • 5,613
  • 13
  • 73
  • 107
5
votes
2 answers

TBB acting strange in Matlab Mex file

Edited:< Matlab limits TBB but not OpenMP > My question is different than the one above, it's not duplicated though using the same sample code for illustration. In my case I specified num of threads in tbb initialization instead of using "deferred".…
yfeng
  • 110
  • 7
5
votes
1 answer

using c++11 auto as return type for const function object

I have a const function object and for the timebeing, it returnes void. but can return int or double. I am writing the code in c++11 style and was just trying to use auto as return type. Although the code compiles, I am not sure it is 100% correct…
Pogo
  • 475
  • 3
  • 19
5
votes
0 answers

TBB build with android OpenCV sample

I am doing android "face-detection" application using OpenCV. For this I have downloaded the OpenCV-2.4.5-android-sdk and used the "face-detection" sample. The application is working good but the video streaming is too slow. So I want to speed up…
SKK
  • 1,705
  • 3
  • 28
  • 50
5
votes
1 answer

TBB possible memory leak

Test program: #include int main(void) { tbb::parallel_invoke([]{},[]{}); return 0; } Compiled using g++ -std=c++11 tmp.cpp -ltbb Checked with valgrind --tool=memcheck --track-origins=yes \ …
gongzhitaao
  • 6,566
  • 3
  • 36
  • 44
5
votes
1 answer

AMD multi-core programming

I want to start to write applications(C++) that will utilize the additional cores to execute portions of the code that have a need to perform lots of calculations and whose computations are independent of each other. I have the following processor…
iceman
  • 4,211
  • 13
  • 65
  • 92
5
votes
1 answer

lambda expression error: expression must be a modifiable lvalue

Ok, the codes are: vector> imageFiltered; // some processing codes here parallel_for( blocked_range(0, imageFiltered.size()), [=](const blocked_range& r) { for( unsigned i = r.begin(); i != r.end();…
Adrian Yu
  • 84
  • 1
  • 5
5
votes
2 answers

Opencv cascade train time

I use opencv_traincascade for training using following parameters opencv_traincascade -data cascade_model -vec ..\create_template\pos_vec_file -bg ..\BG\bg.txt -featureType LBP -w 32 -h 32 -numPos 5000 -numNeg 10000 I tried to give more memory 1024…
Alex Hoppus
  • 3,821
  • 4
  • 28
  • 47
5
votes
1 answer

Statically partitioning tbb::parallel_for

I have a dataset which I'd like to consume with tbb::parallel_for in intervals of size interval_size. Each interval that my functor consumes should be interval_size, except for the last partial interval, which may be smaller when interval_size does…
Jared Hoberock
  • 11,118
  • 3
  • 40
  • 76
5
votes
2 answers

Threading Building Blocks (TBB) for Qt-based CD ripper?

I am building a CD ripper application in C++ and Qt. I would like to parallelize the application such that multiple tracks can be encoded concurrently. Therefore, I have structured the application in such a way that encoding a track is a "Task",…
Jason Voegele
  • 1,918
  • 1
  • 19
  • 18
4
votes
3 answers

Is it still worth to invest time into OpenMP implementations?

Since clang/llvm has no plan to support OpenMP any time soon, and Intel is going far away down the road of TBB library. Is it still worth to implement multi-thread scientific libraries (I am working on ccv: http://github.com/liuliu/ccv) on top of…
liuliu
  • 721
  • 1
  • 8
  • 19
4
votes
1 answer

Parallel reduction of an array on CPU

Is there a way to do parallel reduction of an array on CPU in C/C++?. I recently learnt that it's not possible using openmp. Any other alternatives?
captain
  • 815
  • 14
  • 26