Intel® Threading Building Blocks

cross compilation from linux to windows using mingw-w64


I have some difficulty to cross compile tbb on my linux machine. My aim is to compile tbb on linux but for use on windows. The cross compiler is mingw-w64: x86_64-w64-mingw32-g++-5.2.0.

For other libraries, I normally just set CC, CXX, CFLAGS and CXXFLAGS and run configure, make, make install:

CC=x86_64-w64-mingw32-gcc-5.2.0 CXX=x86_64-w64-mingw32-g++-5.2.0 ./configure; make; make install

However for tbb, there is no such configure procedure and I was not able to modify the .inc files in build to do the same.

Slower parallel run in the modified example, "concurrent_hash_map"

Only changed srand(time(NULL)) instead of srand(2) (in the main() function, Ln.186)

int main( int argc, char* argv[] ) {
    try {
        tbb::tick_count mainStartTime = tbb::tick_count::now();
//        srand(2);

After modifying it, some executions got slower in parallel run.
It looks some different set of data caused this.
Can anyone explain why this behavior happens?
I'm newbie of Intel TBB. So please let me know if I misunderstand something.

Priority Queue insertion of max element


I need to use a concurrent priority queue for extracting min-values elements.

I know that in my domain, during a pushback of an element it is assured that the element's value is greater than all values of elements in the queue prior to the pushback operation. 

Can I assume from this that the pushback operation will have O(1) complexity? (similarly to the classic array-based heap implementation, where a new element is inserted at the next free position in the array, and then a "heapify" operation cascades it up the heap if necessary).



Linking in Qt Creator


I found this page in the Intel Developer Zone:

It sais how to use using standart Linux compiler and linker.

Could you, please, help me doing the same using Qt Creator in Linux. What should I write in the pro-file to achieve the same result?

Thanks in advance.

Number of workers


I am using TBB for multithreading in a program where each workers needs to have access to a different ressource (Think of an object that can be read and mutated by the worker). To do that, I am creating a pool of resources in a std::vector

Memory leaks in ITT included with TBB 4.4 U2

Hi! In TBB 4.4 U2, the version of ITT included (in the tools_api folder) will leak two small chunks of memory for every worker thread created.

The following simple call is enough to reproduce the leaks (tested on x64 build using VS2015 Update 1) :

tbb::parallel_invoke([] {}, [] {});

(To avoid false positives due to process exit before worker threads are shutdown, we should use tbb::task_scheduler_init and TBB_PREVIEW_WAITING_FOR_WORKERS.)

parallel_for_each on std::vector<std::unique_ptr> >


Dear community,

I'm trying to execute a parallel_for_each on a std::vector of unique_ptr.

std::vector<std::unique_ptr<SomeClass> > foo;
  , foo.end()
  , [&] (std::unique_ptr<SomeClass>& singleFoo) { singleFoo -> method();}

However, compiling this code results in an error, because the "implicitly deleted copy constructor" (of the unique_ptr) is called. 

I think the issue is similar to using the following code

TBB vs. OpenMP

I'm just wondering why should we use TBB instead of OpenMP in HPC aplications? Is there any specific featrue(s) that separate this libraray from OpenMP? I have developed a small benchmark for the sake of comparing performance and mostly OpenMP beat TBB. 


Intel® Parallel Studio XE 2015 Update 6 Professional Edition for Fortran and C++ Linux*

Intel® Parallel Studio XE 2015 Update 6 Professional Edition for Fortran and C++ parallel software development suite combines Intel's C/C++ compiler and Fortran compiler; performance and parallel libraries; error checking, code robustness, and performance profiling tools into a single suite offering.  This new product release includes:

  • Linux*
  • C/C++
  • Fortran
  • Intel® Parallel Studio XE
  • Intel® Parallel Studio XE Composer Edition
  • Intel® Parallel Studio XE Professional Edition
  • Intel® VTune™ Amplifier
  • Intel® C++ Compiler
  • Intel® Inspector
  • Intel® Advisor
  • Intel® Fortran Compiler
  • Intel® Math Kernel Library
  • Intel® Threading Building Blocks
  • Intel® Integrated Performance Primitives
  • Subscribe to Intel® Threading Building Blocks