GDCE: Parallelize your Games with Intel® TBB

Introduction to Intel® Threading Building Blocks

This video introduces you to Intel® Threading Building Blocks and provide some examples of how to use it.

An Introduction to the Intel® TBB Flow Graph

This video will introduce you to the flow graph feature in Intel® Threading Building Blocks (Intel® TBB) and provide examples of how it can be used. The flow graph feature provides a flexible and convenient API for parallel reactive and streaming applications.

Optimizing Game Architecture with Intel® TBB

Brad Werth, Intel Senior Software Engineer, spoke to game developers at GDC about how the cross-platform library, Intel® TBB, can enhance game performance.

Using Intel® Threading Building Blocks

Introduction to using the parallel_for template from Intel® TBB. Follow along with the sample code from the Add Parallelism Evaluation Guide.

GDCE: Parallelize your Games with Intel® TBB

During GDC, we had the opportunity to talk to Dr. Mario Deilmann from Intel about Intel® TBB and why game developers should consider using this template library. Moreover we learnt what the main benefits are of Intel® TBB and how it can help developers to parallelize their games.

Why Use Intel® TBB?

Why use it?

Intel® Threading Building Blocks (Intel® TBB) lets you easily write parallel C++ programs that take full advantage of multicore performance, that are portable and composable, and that have future-proof scalability.


What is it?

Widely used C++ template library for task parallelism

 


Primary features
  • Parallel algorithms and data structures
  • Scalable memory allocation and task scheduling

 


Reasons to use
  • Rich feature set for general purpose parallelism
  • C++; Windows*, Linux*, OS X* and other OSes

Learn More


Latest Posts

News
Forums
March 20, 2013: Intel® TBB and Windows Store* applications

Learn more about how to start using the Intel TBB library with Windows Store* applications.

Also available - the IDZ blog in Portuguese.

March 14, 2013: New video about the flow graph feature

New video about TBB's flow graph

This video will introduce you to the flow graph feature in Intel® TBB and provide examples of how it can be used. The flow graph feature provides a flexible and convenient API for parallel reactive and streaming applications.

February 15, 2013: Intel® TBB and Android* applications

Check out the IDZ blog about how to start using Intel TBB library with Android* applications.

I'm working with large dataset. I'm using several concurrent_vector and concurrent_hash_map for that purpose. After running for a while I'm getting bad_alloc exception. 

According to this answer

 concurrent_vector, I assume, is adding new blocks of memory but keeps using the old ones. Not moving objects is important as it allows other threads to keep accessing the vector even as it is being re-sized. It probably also helps with other optimizations (such as keeping cached copies valid.) The downside is access to the elements is slightly slower as the correct block needs to be found first (one extra deference.)

So there's a chance I'm getting bad_alloc due to heap fragmentation. How can I avoid heap fragmentation?

I'm a newbie at Intel TBB. I'm using concurrent_vector and concurrent_hash_map. I haven't allocate anything using new, so may be there is no memory leak. But I'm getting bad allocation exception. I'm using 32 bit Linux Mint 14 on VMWare workstation which has 3GB of memory. How can I debug is my program leaking memory or it's just the program can't allocate enough memory?

Hi,

I've tried to compile and run this code with tbb 4.1:

http://software.intel.com/sites/products/documentation/doclib/tbb_sa/help/reference/flow_graph/message_flow_graph_example.htm

But found some errors, the changes I did to make it work was to replace:

broadcast_node<int> input;

for

broadcast_node<int> input(g);

and 

make_edge( squarer, std::get<0>( join.inputs() ) );
make_edge( cuber, std::get<1>( join.inputs() ) );

for:

make_edge( squarer, std::get<0>( join.input_ports() ) );
make_edge( cuber, std::get<1>( join.input_ports() ) );

With that I could compile with tbb 4.1 

Regards,

Internal Tags:  graph
Gamescom 2012 – PC Gaming comes out swinging! So… I just got back from GDC-Europe, and Gamescom. Both were fantastic events. My only regret is that I couldn’t stay a day or two longer. For GDC-Europe the highlight for me was Victor Kisliy’s (CEO Wargaming.net) Keynote on the Free to Play business model. Definitely more [...]
  In preparation for the Microsoft Windows 8* launch, Intel has updated the OpenCL* toolkits for application developers –Intel® SDK for OpenCL* Applications 2013 Beta. In addition to Windows 8*, the Intel SDK for OpenCL Applications Beta now supports OpenCL 1.2 API previews on CPU and other features such as a new kernel builder and [...]
Yeah… I know the title sounds sensationalistic. However; the news that broke last week about Windows Phone 8 (aka WP8) I believe is by FAR a bigger story than what it’s being given credit for. Why? In short it’s simply this. WP8 is running on a kernel layer shared with Win 8 and Win RT. [...]
We achieved great scaling with a minimum of effort on our part. Intel TBB gave us cross-platform atomic operations, thread-safe containers, threads, and thread-locking mechanisms as well as multi-thread allocators in one package.
Michaël Rouillé
CTO, Golaem

Documentation

User Guide
Reference Manual
Stable Documentation
Latest Documentation
Doxygen
Release Notes
CHANGES file

Resources

TBB Forums
Code Samples
FAQs
Licensing

 

Structured Parallel Programming:
Patterns for Efficient Computation

Buy Now

Intel Threading Build Blocks:
Outfitting C++ for Multi-Core Processor Parallelism

Buy Now