tlx
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages

Specialized Sorting Algorithms. More...

Namespaces

 tlx::parallel_mergesort_detail
 

Parallel Sorting Algorithms

template<bool Stable, typename RandomAccessIterator , typename Comparator >
void parallel_mergesort_base (RandomAccessIterator begin, RandomAccessIterator end, Comparator comp, size_t num_threads=std::thread::hardware_concurrency(), MultiwayMergeSplittingAlgorithm mwmsa=MWMSA_DEFAULT)
 Parallel multiway mergesort main call. More...
 
template<typename RandomAccessIterator , typename Comparator = std::less< typename std::iterator_traits<RandomAccessIterator>::value_type>>
void parallel_mergesort (RandomAccessIterator begin, RandomAccessIterator end, Comparator comp=Comparator(), size_t num_threads=std::thread::hardware_concurrency(), MultiwayMergeSplittingAlgorithm mwmsa=MWMSA_DEFAULT)
 Parallel multiway mergesort. More...
 
template<typename RandomAccessIterator , typename Comparator = std::less< typename std::iterator_traits<RandomAccessIterator>::value_type>>
void stable_parallel_mergesort (RandomAccessIterator begin, RandomAccessIterator end, Comparator comp=Comparator(), size_t num_threads=std::thread::hardware_concurrency(), MultiwayMergeSplittingAlgorithm mwmsa=MWMSA_DEFAULT)
 Stable parallel multiway mergesort. More...
 

String Sorting Algorithms

void sort_strings (char **strings, size_t size, size_t memory=0)
 Sort a set of strings represented by C-style char* in place. More...
 
void sort_strings (unsigned char **strings, size_t size, size_t memory=0)
 Sort a set of strings represented by C-style uint8_t* in place. More...
 
void sort_strings (const char **strings, size_t size, size_t memory=0)
 Sort a set of strings represented by C-style char* in place. More...
 
void sort_strings (const unsigned char **strings, size_t size, size_t memory=0)
 Sort a set of strings represented by C-style uint8_t* in place. More...
 
void sort_strings (std::vector< char * > &strings, size_t memory=0)
 Sort a set of strings represented by C-style char* in place. More...
 
void sort_strings (std::vector< unsigned char > &strings, size_t memory=0)
 Sort a set of strings represented by C-style uint8_t* in place. More...
 
void sort_strings (std::vector< const char * > &strings, size_t memory=0)
 Sort a set of strings represented by C-style char* in place. More...
 
void sort_strings (std::vector< const unsigned char * > &strings, size_t memory=0)
 Sort a set of strings represented by C-style uint8_t* in place. More...
 
void sort_strings (std::string *strings, size_t size, size_t memory=0)
 Sort a set of std::strings in place. More...
 
void sort_strings (std::vector< std::string > &strings, size_t memory=0)
 Sort a vector of std::strings in place. More...
 

Detailed Description

Specialized Sorting Algorithms.

Function Documentation

void tlx::parallel_mergesort ( RandomAccessIterator  begin,
RandomAccessIterator  end,
Comparator  comp = Comparator(),
size_t  num_threads = std::thread::hardware_concurrency(),
MultiwayMergeSplittingAlgorithm  mwmsa = MWMSA_DEFAULT 
)

Parallel multiway mergesort.

Parameters
beginBegin iterator of sequence.
endEnd iterator of sequence.
compComparator.
num_threadsNumber of threads to use.
mwmsaMultiwayMergeSplittingAlgorithm to use.

Definition at line 338 of file parallel_mergesort.hpp.

void tlx::parallel_mergesort_base ( RandomAccessIterator  begin,
RandomAccessIterator  end,
Comparator  comp,
size_t  num_threads = std::thread::hardware_concurrency(),
MultiwayMergeSplittingAlgorithm  mwmsa = MWMSA_DEFAULT 
)

Parallel multiway mergesort main call.

Parameters
beginBegin iterator of sequence.
endEnd iterator of sequence.
compComparator.
num_threadsNumber of threads to use.
mwmsaMultiwayMergeSplittingAlgorithm to use.
Template Parameters
StableStable sorting.

Definition at line 276 of file parallel_mergesort.hpp.

void sort_strings ( char **  strings,
size_t  size,
size_t  memory = 0 
)

Sort a set of strings represented by C-style char* in place.

The strings are sorted as unsigned 8-bit characters, not signed characters! If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 20 of file strings1.cpp.

void sort_strings ( unsigned char **  strings,
size_t  size,
size_t  memory = 0 
)

Sort a set of strings represented by C-style uint8_t* in place.

If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 25 of file strings1.cpp.

void sort_strings ( const char **  strings,
size_t  size,
size_t  memory = 0 
)

Sort a set of strings represented by C-style char* in place.

The strings are sorted as unsigned 8-bit characters, not signed characters! If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 20 of file strings2.cpp.

void sort_strings ( const unsigned char **  strings,
size_t  size,
size_t  memory = 0 
)

Sort a set of strings represented by C-style uint8_t* in place.

If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 25 of file strings2.cpp.

void sort_strings ( std::vector< char * > &  strings,
size_t  memory = 0 
)

Sort a set of strings represented by C-style char* in place.

The strings are sorted as unsigned 8-bit characters, not signed characters! If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 30 of file strings1.cpp.

void tlx::sort_strings ( std::vector< unsigned char > &  strings,
size_t  memory = 0 
)

Sort a set of strings represented by C-style uint8_t* in place.

If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

void sort_strings ( std::vector< const char * > &  strings,
size_t  memory = 0 
)

Sort a set of strings represented by C-style char* in place.

The strings are sorted as unsigned 8-bit characters, not signed characters! If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 30 of file strings2.cpp.

void sort_strings ( std::vector< const unsigned char * > &  strings,
size_t  memory = 0 
)

Sort a set of strings represented by C-style uint8_t* in place.

If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 34 of file strings2.cpp.

void sort_strings ( std::string *  strings,
size_t  size,
size_t  memory = 0 
)

Sort a set of std::strings in place.

The strings are sorted as unsigned 8-bit characters, not signed characters! If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 20 of file strings3.cpp.

void sort_strings ( std::vector< std::string > &  strings,
size_t  memory = 0 
)

Sort a vector of std::strings in place.

The strings are sorted as unsigned 8-bit characters, not signed characters! If the memory limit is non zero, possibly slower algorithms will be selected to stay within the memory limit.

Definition at line 25 of file strings3.cpp.

void tlx::stable_parallel_mergesort ( RandomAccessIterator  begin,
RandomAccessIterator  end,
Comparator  comp = Comparator(),
size_t  num_threads = std::thread::hardware_concurrency(),
MultiwayMergeSplittingAlgorithm  mwmsa = MWMSA_DEFAULT 
)

Stable parallel multiway mergesort.

Parameters
beginBegin iterator of sequence.
endEnd iterator of sequence.
compComparator.
num_threadsNumber of threads to use.
mwmsaMultiwayMergeSplittingAlgorithm to use.

Definition at line 361 of file parallel_mergesort.hpp.