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.
Widely used C++ template library for task parallelism
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.
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?
I've tried to compile and run this code with tbb 4.1:
But found some errors, the changes I did to make it work was to replace:
make_edge( squarer, std::get<0>( join.inputs() ) );
make_edge( cuber, std::get<1>( join.inputs() ) );
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