The internal implementation need* threads which permit reuse the
initialized variables*. This feature is no implemented in the C++ standard
at today, and I didn’t see in the thread pool implementations which I
examined
I implemented this with threads and atomic variables. The thread are
created at the beginning of the program where initialize the thread pool
variables which are destroyed with the thread.* The threads are created
only 1 time*.
The parallel_for and parallel_while are implemented with atomic variables
in a short and easy way to understand and debug.
The works for to execute by the threads are implemented by std::function
objects stored in a concurrent stack. The work time estimated by each
object function is a few milliseconds.
This internal design is highly efficient with many threads. ( I checked in
a dual socket servers with 32 and 48 threads) and the results compared with
GCC parallel sort are better with many threads.
About the goals of this library :
The first is to create a library* extremely easy to understand and use*.
(You only need to include boost/sort/parallel/sort.hpp )
The library must be *independent of any other code*.( You can use
separately, only need to copy the boost/sort/parallel folder, and all the
code needed is included)
The library must use *only the C++11 compliant compiler*. The code can run
in an embedded multi core system or in a powerful processor, plenty of
cores, in a big server.
The advantage of the algorithms are
*parallel_sort, sample_sort* : this algorithm is commonly accepted as the
fastest for the parallel stable sort. The implementation is *notoriously
faster than the provided by the GCC compiler* ( based on Open MP ) using
less memory. TBB don’t provide parallel stable sort, and only have an
experimental code in their web pages
*parallel_sort* : the advantage of this algorithm, invented by me, is the
memory usage.* The speed is similar to GCC parallel sort, but THE MEMORY
USED IS A HALF.*
The algorithms are *exception safe*, meaning that the exceptions generated
by the algorithms guarantee the integrity of the objects to sort, but not
their relative order. If the exception is generated inside the objects (in
the move or in the copy constructor) the results can be unpredictable
Thanks by your interest
Francisco
* I take a quick look at your library, and see many interesting things
inside.