Arranges the elements in a specified range into a nondescending order, or according to an ordering criterion specified by a binary predicate, in parallel. This function is semantically similar to std::sort in that it is a compare-based, unstable, in-place sort.
template< typename _Random_iterator > inline void parallel_sort( const _Random_iterator &_Begin, const _Random_iterator &_End ); template< typename _Random_iterator, typename _Function > inline void parallel_sort( const _Random_iterator &_Begin, const _Random_iterator &_End, const _Function &_Func, const size_t _Chunk_size = 2048 );
The first overload uses the the binary comparator std::less.
The second overloaded uses the supplied binary comparator that should have the signature bool _Func(T, T) where T is the type of the elements in the input range.
The algorithm divides the input range into two chunks and successively divides each chunk into two sub-chunks for execution in parallel. The optional argument _Chunk_size can be used to indicate to the algorithm that it should handles chunks of size < _Chunk_size serially.