Menu

#10 Compatibility with TBB

open
nobody
None
5
2007-07-26
2007-07-26
No

It would be fine to add the concept of divisible range as seen in TBB http://osstbb.intel.com/ and http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2104.pdf "A Proposal to Add Parallel Iteration to the Standard Library".
Their concepts are not quite the same:
- RPA can handle "forward iterators" and interleaved scheduling, and tries to adapt to all sort of containers.
- RPA gives full control on the threads and mutex types, guarantying portability on any platform, giving the possiblity to run on several processes (not threads) for superior reliability. It gives as well a degraded sequential mode, for testing. The scheduling is deterministic.
- It is closer the STL algorithms, does not require any specialized container (sometimes gives specific optimizations) therefore to existing sequential code.
- Pipelines (The RPA concept is totally different from TBB's one) are nicely integrated with the rest of the machinery.
- Streams (Files and sockets) are integrated.

On the other hand:
- TBB has a built-in thread pool.
- The concept of divisible blocked_ranges applies well to all sorts of algorithms.

Several tasks can be of interest, if this proposal becomes part of the standard:
- Consider the TBB algorithms parallel_for, parallel_while and parallel_reduce as plain STL algorithms, for which an implementation is already available.
- Emulate STL algorithms with TBB ones and vice-versa.
- Process tbb::blocked_range as a new type of range, a recursive one, added to the three existing (For static, dynamic and interleaved scheduling).
- Use the TBB scheduler as a specialization of thread_tree: This means considering as list of available threads as a thread_pool.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.