Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Function stable_sort



// In header: <boost/compute/algorithm/stable_sort.hpp>

template<typename Iterator, typename Compare> 
  void stable_sort(Iterator first, Iterator last, Compare compare, 
                   command_queue & queue = system::default_queue());
template<typename Iterator> 
  void stable_sort(Iterator first, Iterator last, 
                   command_queue & queue = system::default_queue());


Sorts the values in the range [first, last) according to compare. The relative order of identical values is preserved.

Space complexity: (n)

See Also:

sort(), is_sorted()