Saturday, January 17, 2009

Data parallel multi-core C++ computations

Threading Building Blocks is a collection of generic containers and algorithms for performing data parallel multi-core computations. The key ideas is that the programmer should not deal with low-level thread and syncronization issues, but with an higher data-parallel paradigm. This reminds me somehow the old-time, old-school skeleton parallel computation, where the language gives a fixed number of parallel constructs which are optimized by the compiler.

TBB has a rich set of containers such as concurrent_vector, concurrent_queue, concurrent_hash_map, and data-parallel algorithms such as parallel_for, parallel_sort, parallel_while, parallel_scan, parallel_reduce, and compositions such as pipeline and task (see Tutorial | Reference Manual | Code Samples). I am playing with the library and I found it versatile enough.

No comments:

Post a Comment