tbb

Any experiences with Intel's Threading Building Blocks?

Intel's Threading Building Blocks (TBB) open source library looks really interesting. Even though there's even an O'Reilly Book about the subject I don't hear about a lot of people using it. I'm interested in using it for some multi-level parallel applications (MPI + threads) in Unix (Mac, Linux, etc.) environments. For what it's wort...

Is this C++ implementation for an Atomic float safe?

Edit: The code here still has some bugs in it, and it could do better in the performance department, but instead of trying to fix this, for the record I took the problem over to the Intel discussion groups and got lots of great feedback, and if all goes well a polished version of Atomic float will be included in a near future release ...

Intel’s Threading Building Blocks "runtime exception" license: What does it mean?

Just been looking at the threading building blocks, and as their license, they say it's the GPLv2 with the runtime exception. On the Intel page itself they say that the commercial license is the right one if you need commercial support. So what's the deal if I'm doing a commercial, closed source application which uses the TBB, but I don...

C++ Parallelization Libraries: OpenMP vs. Thread Building Blocks

Hi, I'm going to retrofit my custom graphics engine so that it takes advantage of multicore CPUs. More exactly, I am looking for a library to parallelize loops. It seems to me that both OpenMP and Intel's Thread Building Blocks are very well suited for the job. Also, both are supported by Visual Studio's C++ compiler and most other po...

How to statically link to TBB?

How can I statically link the intel's TBB libraries to my application? I know all the caveats such as unfair load distribution of the scheduler, but I don't need the scheduler, just the containers, so it's ok. Anyways I know this can be done, although its undocumented, however I just can't seem to find the way to do it right now (altho...

How does Intel TBB's scalable_allocator work ?

What does the tbb::scalable_allocator in Intel Threading Building Blocks actually do under the hood ? It can certainly be effective. I've just used it to take 25% off an apps' execution time (and see an increase in CPU utilization from ~200% to 350% on a 4-core system) by changing a single std::vector<T> to std::vector<T,tbb::scalable_...

debugging Intel's TBB containers

Recently we have started working with Intel's TBB and found that when debugging containers we cannot really watch the elements and their data. Is there a flag setting, a plugin or a tricky way to enable this? (maybe a script snipit for Visual to work with) ...

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", and I'm working on a mechanism to run some number of these Tasks concurrently. I could, of ...

Did Visual Studio 2008 SP1 introduce runtime bugs or am I crazy?

I've been wracking my brains out trying to figure out what the heck is going on with the most recent (non beta) Visual Studio 2008 SP1: My app built with OpenMP runs incredibly slow in the debugger, bringing CPU usage to 100%. When they are run outside the debugger, it merely runs slowly (for a release build). My app built with the Int...

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 : x64 Family 15 Model 104 Stepping 2 Authentic AMD ~1900 Mhz running on Windows Vista Home...

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, we also need a good (commercial is preferred) math library for both. Does anyone know of...

Using Intel Threading Building Blocks (TBB) in Linux

Hi, I want to use Intel Threading Building Blocks (TBB) in Linux. Can anyone suggest a good IDE for that and possibly any steps to integrate TBB with that IDE? Thanks, Rakesh. ...

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 running blocking operations. Currently I'm looking into using pipe()+libevent. Is there a faster and more elegant alternative for use with Intel Threading Building Blocks? ...

How does one modify the thread scheduling behavior when using Threading Building Blocks (TBB)?

Does anyone know how to modify the thread scheduling (specifically affinity) when using TBB? Doing a high level analysis on a simple parallel-for application, it seems like TBB is specifying the underlying threads' affinity in a way that reduces performance. Specifically, the cores I'm running on have hyper-threading enabled, and it lo...

How do I link against Intel TBB on Mac OS X with GCC?

I can't for the life of me figure out how to compile and link against the Intel TBB library on my Mac. I've run the commercial installer and the tbbvars.sh script but I can't figure this out. I have a feeling it is something really obvious and it's just been a bit too long since I've done this kind of thing. tbb_test.cpp #include <tbb/...

A question about some code from TBB book, Thanks.

I am reading the book: Intel Threading Building Blocks. I often have difficulties understanding them. For example,the following code is from the book(page 112): Node* AllocateNode() { Node* n; FreeListMutexType::scoped_lock lock; lock.acquire(FreeListMutex); n=FreeList; if(n) Freelist=n->next; lock.release(); if(!n) n=new Node(); retur...

Is it safe to spin on a volatile variable in user-mode threads?

I'm not quite sure if it's safe to spin on a volatile variable in user-mode threads, to implement a light-weight spin_lock, I looked at the tbb source code, tbb_machine.h:170, //! Spin WHILE the value of the variable is equal to a given value /** T and U should be comparable types. */ template<typename T, typename U> void spin_wait_whi...

A question about TBB/C++ code

I am reading The thread building block book. I do not understand this piece of code: FibTask& a=*new(allocate_child()) FibTask(n-1,&x); FibTask& b=*new(allocate_child()) FibTask(n-2,&y); What do these directive mean? class object reference and new work together? Thanks for explanation. The following code is the defination...

How can I build multiple processes with TBB?

Now I plan to parallelize my sequential solver. It is a solver for solving vehicle routing problem. My solver is coded in C++. I hope I could run several copies of my solver(maybe with different parameters) in parallel simultaneously on a multi-core computer. Can I do this with TBB? The reason I ask this question is that the book (Intel ...

How do i write tasks? (parallel code)

I am impressed with intel thread building blocks. I like how i should write task and not thread code and i like how it works under the hood with my limited understanding (task are in a pool, there wont be 100 threads on 4cores, a task is not guaranteed to run because it isnt on its own thread and may be far into the pool. But it may be r...