ppqsort namespace

Namespaces

namespace execution
namespace impl
namespace parameters

Functions

template<typename RandomIt>
void sort(RandomIt begin, RandomIt end)
template<typename ExecutionPolicy, typename RandomIt>
void sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end)
template<typename ExecutionPolicy, typename RandomIt>
void sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end, const int threads)
Sorts the elements in the range [begin, end) utilizing the specified number of threads.
template<typename RandomIt, typename Compare>
void sort(RandomIt begin, RandomIt end, Compare comp)
Sorts the elements in the range [begin, end) using provided comparator. Will run sequentially.
template<typename ExecutionPolicy, typename RandomIt, typename Compare>
void sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end, Compare comp)
Sorts the elements in the range [begin, end) using provided comparator.
template<typename ExecutionPolicy, typename RandomIt, typename Compare>
void sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end, Compare comp, const int threads)
Sorts the elements in the range [begin, end) using provided comparator and utilizing the specified number of threads.

Function documentation

#include <ppqsort.h>
template<typename RandomIt>
void ppqsort::sort(RandomIt begin, RandomIt end)

#include <ppqsort.h>
template<typename ExecutionPolicy, typename RandomIt>
void ppqsort::sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end)

Template parameters
ExecutionPolicy
RandomIt
Parameters
policy Defined execution policy. Use predefined policies from namespace ppqsort::execution.
begin Iterator to the first element in the range.
end Iterator to the element past the last element in the range.

@Brief Sorts the elements in the range [begin, end). Will use std::less as comparator and std::thread::hardware_concurrency() as the number of threads.

#include <ppqsort.h>
template<typename ExecutionPolicy, typename RandomIt>
void ppqsort::sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end, const int threads)

Sorts the elements in the range [begin, end) utilizing the specified number of threads.

Template parameters
ExecutionPolicy
RandomIt
Parameters
policy Defined execution policy. Use predefined policies from namespace ppqsort::execution.
begin Iterator to the first element in the range.
end Iterator to the element past the last element in the range.
threads Number of threads to use for sorting.

#include <ppqsort.h>
template<typename RandomIt, typename Compare>
void ppqsort::sort(RandomIt begin, RandomIt end, Compare comp)

Sorts the elements in the range [begin, end) using provided comparator. Will run sequentially.

Template parameters
RandomIt
Compare
Parameters
begin Iterator to the first element in the range.
end Iterator to the element past the last element in the range.
comp Comparator to use for sorting.

#include <ppqsort.h>
template<typename ExecutionPolicy, typename RandomIt, typename Compare>
void ppqsort::sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end, Compare comp)

Sorts the elements in the range [begin, end) using provided comparator.

Template parameters
ExecutionPolicy
RandomIt
Compare
Parameters
policy Defined execution policy. Use predefined policies from namespace ppqsort::execution.
begin Iterator to the first element in the range.
end Iterator to the element past the last element in the range.
comp Comparator to use for sorting.

#include <ppqsort.h>
template<typename ExecutionPolicy, typename RandomIt, typename Compare>
void ppqsort::sort(ExecutionPolicy&& policy, RandomIt begin, RandomIt end, Compare comp, const int threads)

Sorts the elements in the range [begin, end) using provided comparator and utilizing the specified number of threads.

Template parameters
ExecutionPolicy
RandomIt
Compare
Parameters
policy Defined execution policy. Use predefined policies from namespace ppqsort::execution.
begin Iterator to the first element in the range.
end Iterator to the element past the last element in the range.
comp Comparator to use for sorting.
threads Number of threads to use for sorting.