Program Listing for File ParallelSort.h
↰ Return to documentation for file (ADS/parallel/ParallelSort.h)
/*--------------------------------------------------------------------------*/
/*--------------------------- File ParallelSort.h --------------------------*/
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
/*----------------------------- DEFINITIONS --------------------------------*/
/*--------------------------------------------------------------------------*/
#ifndef __ADS_ParallelSort
#define __ADS_ParallelSort
/* self-identification: #endif constant */
/*--------------------------------------------------------------------------*/
/*------------------------------ INCLUDES ----------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/Contract.h"
#include "ADS/memory/HugePageAllocator.h"
#include "ADS/parallel/Executor.h"
#include "ADS/parallel/ParallelMerge.h"
#include "ADS/parallel/Scratch.h"
#include "ADS/sort/RadixSort.h"
#include "ADS/sort/Sort.h"
#include "ADS/sort/VectorQuickSort.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <vector>
/*--------------------------------------------------------------------------*/
/*--------------------------- NAMESPACE ------------------------------------*/
/*--------------------------------------------------------------------------*/
namespace ADS {
inline constexpr std::size_t kParallelSort = std::size_t( 1 ) << 15;
inline constexpr std::size_t kParallelSortThreads = 3;
template< Executor E , class T , class C = std::less<> >
void sort( E & ex , std::vector< T > & A , C less = C() );
template< Executor E , class T , class C = std::less<> >
void stableSort( E & ex , std::vector< T > & A , C less = C() );
/*--------------------------------------------------------------------------*/
} // end( namespace ADS )
/*--------------------------------------------------------------------------*/
/*-------------------------- IMPLEMENTATION --------------------------------*/
/*--------------------------------------------------------------------------*/
#include "ADS/parallel/impl/ParallelSort.tpp"
/*--------------------------------------------------------------------------*/
#endif /* ParallelSort.h included */
/*--------------------------------------------------------------------------*/
/*------------------------ End File ParallelSort.h -------------------------*/
/*--------------------------------------------------------------------------*/