Changes

Jump to: navigation, search

GPU621/Fighting Mongooses

1,310 bytes added, 22:13, 30 November 2016
Fighting Mongooses: Added content
'''Entry on: November 30th 2016'''
 
==Introduction==
 
There are decisions to make regarding, if even you SHOULD parallelize your program, what method or libraries should you use? To compare two specific possibilties, is it better to use standardized C++ solutions, or Thread Building Blocks?
 
The main issue with parallelism as it exists currently in C++ is that it is very much a Wild West scenario where external companies are the ones flagshipping the parallel movement. That isn’t to say that there are no options for parallelization in C++ natively, but aside from experimental and non-finalized solutions there is not much more to work with other than std::thread to manually create threads, or the Boost library.
 
That said, while the C++11 standard solutions are considered ‘experimental’, they are largely functional and comparable to TBB functionality in most cases in terms of efficiency.
 
==STL==
 
The [https://en.wikipedia.org/wiki/Standard_Template_Library Standard Template Library (STL)] is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called algorithms, containers, functional, and iterators. As early as 2006, parallelization has been being pushed for inclusion in the STL for C++, to some success (more on this later).
==TBB==
 
TBB (Threading Building Blocks) is a high-level, general purpose, feature-rich library for implementing parametric polymorphism using threads. It includes a variety of containers and algorithms that execute in parallel and has been designed to work without requiring any change to the compiler. Uses task parallelism, Vectorization not supported.
==BOOST==
 
BOOST provides free peer-reviewed portable C++ source libraries. Boost emphasizes libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. Ten Boost libraries are included in the [http://www.open-std.org/jtc1/sc22/wg21/ C++ Standards Committee's] Library Technical Report ([http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1745.pdf TR1]) and in the new C++11 Standard. C++11 also includes several more Boost libraries in addition to those from TR1. More Boost libraries are proposed for standardization in C++17.
'''Multithreading Support for Older Code (Visual C++)''' - Older technologies that may be useful in older applications. For new apps, use the Concurrency Runtime or C++ AMP.
 
==Auto-Parallelizer==
==Conclusion==
The conclusion to draw when comparing TBB to STL, in their current states, is that you ideally should use TBBover STL. STL parellelism is still very experimental and unrefined, and will likely remain that way until we see the release of C++17. However, following C++17’s release, using the native parallel library solution will likely be the ideal road to follow.
----
23
edits

Navigation menu