KaMPIng 0.1.1
Flexible and (near) zero-overhead C++ bindings for MPI
|
Plugin that adds a canonical sample sort to the communicator. More...
#include <sort.hpp>
Public Member Functions | |
template<typename T , typename Allocator , typename Compare = std::less<T>> | |
void | sort (std::vector< T, Allocator > &data, Compare comp=Compare{}) |
Sort the vector based on a binary comparison function (std::less by default). | |
template<typename RandomIt , typename OutputIt , typename Compare = std::less<typename std::iterator_traits<RandomIt>::value_type>> | |
void | sort (RandomIt begin, RandomIt end, OutputIt out, Compare comp=Compare{}) |
Sort the elements in [begin, end) using a binary comparison function (std::less by default). | |
Plugin that adds a canonical sample sort to the communicator.
Type | of the communicator that is extended by the plugin. |
DefaultContainerType | Default container type of the original communicator. |
|
inline |
Sort the elements in [begin, end) using a binary comparison function (std::less by default).
The order of equal elements in not guaranteed to be preserved. The binary comparison function has to be true
if the first argument is less than the second.
RandomIt | Iterator type of the container containing the elements that are sorted. |
OutputIt | Iterator type of the output iterator. |
Compare | Type of the binary comparison function (std::less<> by default). |
begin | Start of the range of elements to sort. |
end | Element after the last element to be sorted. |
out | Output iterator used to output the sorted elements. |
comp | Binary comparison function used to determine the order of elements. |
|
inline |
Sort the vector based on a binary comparison function (std::less by default).
The order of equal elements is not guaranteed to be preserved. The binary comparison function has to be true
if the first argument is less than the second.
T | Type of elements to be sorted. |
Allocator | Allocator of the vector. |
Compare | Type of the binary comparison function (std::less<T> by default). |
data | Vector containing the data to be sorted. |
comp | Binary comparison function used to determine the order of elements. |