English | 中文 | Русский | Français
2,856 Posts served
8,606 Conversations started
If you write C or C++ code, and you haven’t given Intel Threading Building Blocks (TBB) a try, you really should. Intel Threading Building Blocks has emerged as the most popular high level programming method for writing parallel programs (see Evans Data Corp: http://www.evansdata.com/research/market_alerts.php). The low level methods (using pthreads or Windows threads directly) popular before high level methods existed should be avoided by those writing new parallel programs because of their substantial learning curve, plus their high costs to create and maintain.
C programmers will want to take another look at Intel Threading Building Blocks (TBB) which has been popularized primarily by C++ programmers. Because C++ didn't have lambda functions, too much of C++ templates showed through when coding common operations. It was intimidating unless you know and like C++ templates. With version 2.2 and the latest compilers, lambda functions let coding with Intel TBB reasonable for C programmers too (using C++ compiler of course!)
Whether you are new to Intel TBB, or a current user, you’ll want to know about the latest version – 2.2. Intel TBB 2.2 can help you improve the scalability and portability of your code while being productive writing parallel programs.
Version 2.2 of Intel TBB is now available, in both the commercial and open source releases. These are built from identical sources – the only real difference is the license and support offerings. Get a copy and learn more at threadingbuildingblocks.org (open source) or threadingbuildingblocks.com (commercial).
Small version number change, but lots to offer
Intel TBB 2.2 maintains the functionality and platform support of previous versions and adds numerous feature and performance improvements, including full support for the lambda capabilities of the new C++ draft standard (C++0x) and more flexibility for developers to redistribute with their applications. Autodesk Maya and Epic Games Unreal Engine are among the applications that will be reshipping some or all of Intel TBB 2.2 to support their developers.
I’m not completely used to the small version increments common with open source projects. I’d have no trouble considering this version 3.0 or 4.0 of TBB as a commercial-only product. Yet 2.2 seems fitting from a point of being modest – a bit understated.
This release is packed with a bunch of additions, which continue to show the maturity you’d expect from a package as popular as Threading Building Blocks has proven itself to be. Users give great feedback, and that leads to improvements.
Automatic memory allocator replacement available
The memory allocator is one of the most popular features of Intel TBB. However, it can be time consuming to replace your own memory allocator calls. Version 2.2 uses a dynamic instrumentation method on Windows and the LD_PRELOAD function on Linux to offer automatic memory allocator replacement throughout your application.
Ron Henderson at DreamWorks Animation summed it up: “The Intel® TBB malloc was an important tool in achieving good parallel speedups for our threaded applications, and a drop-in replacement for the memory allocator in the C standard library.”
Memory allocator faster than ever
Version 2.2 extends the performance lead of Intel TBB’s memory allocator's performance over the competition by delivering even better large-block (over 8K in size) allocation performance.
Scaling of scheduler enhanced significantly
Version 2.2 features a reworked the task scheduler to behave more like an ideal Cilk-style scheduler, yielding even more scalable behavior. True to the promise of using Intel TBB – the benefits of this work come to programs written using Intel TBB without requiring any code changes. Version 2.2 also has improvements to the affinity partitioner, and changes the default for loop templates from the simple_partitioner to the easier to use and adaptive auto_partitioner.
Automatic initialization available
Version 2.2 no longer requires an explicit initialization. Users of prior versions have told us that in a large application it is not easy to initialize in the right place. Version 2.2 takes care of automatically initializing the scheduler when it is first needed.
Parallel algorithms enhancements
Concurrent container enhancements
Redistribution is easier
The licensing of the commercial version has been modified to allow redistribution of required DLLs and header files. This means you can redistribute DLLs and header files from version 2.2 with your application, to enable your customers to write Intel TBB code that will use the master applications DLLs and therefore the same infrastructure.
Also, Intel is offering additional redistribution rights for commercial customers who need more than just the DLLs and header files. If that is of interest, drop us a line and we’ll talk.
Of course, none of this really matters for the open source version – but if the nuisances of using the commercial version has you wanting more – you should ask as Intel is trying to help out.
This effectively makes Intel TBB freely available for the strong community of developers that support some of the world's best software. Gordon Bradley with the Maya Performance Team Lead at Autodesk summed it up: "The Maya team has successfully used Intel's TBB technology to internally parallelize Maya for several releases. Now thanks to Intel, TBB 2.2 lets Maya plug-in developers access the same advanced parallelism features that we've used at no additional charge."
Current users have a little work to do to upgrade
There are some changes you may need to do to move from prior versions of Intel TBB to the new 2.2 version. Personally, I don’t like doing anything to upgrade from one version to another – but sometimes it is necessary. You can simply add “#define TBB_DEPRECATED 1” to your code, and the old interfaces remain available to you (at least for now) – or adjust to the following changes:
Try it today!
Get a copy and learn more at threadingbuildingblocks.org (open source) or threadingbuildingblocks.com (commercial).
| August 4, 2009 3:30 PM PDT
Terry Wilmarth (Intel)
| Please see my post What's New in Intel(R) TBB 2.2 at http://software.intel.com/en-us/blogs/2009/08/04/whats-new-in-int el-tbb-22/ for a list of changes in Intel(R) TBB 2.2. |
| August 5, 2009 8:39 AM PDT
Terry Wilmarth (Intel)
| I've just put up a handy guide to transitioning from Intel(R) TBB 2.1 to 2.2 here: http://software.intel.com/en-us/blogs/2009/08/05/transitioni.....-21-to-22/. |
| August 5, 2009 9:54 AM PDT
Anton Malakhov (Intel)
| concurrent_hash_map is also reworked significantly for performance and scalability, see http://software.intel.com/en-us/forums/intel-threading-build..... ply/91496/ |
| August 5, 2009 4:14 PM PDT
Mark Missana | I purchased the Intel Parallel Studio product within the last month. Will this upgrade from TBB 2.1 to TBB 2.2 be made available to Parallel Studio customers? |
| January 11, 2010 8:10 PM PST
JeffD | Any plans for a new edition of the book? Maybe after another point release or so? |

David Sekowski (Intel)
245
Status Points:
195