Boost C++ Libraries

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

PrevUpHomeNext

Function stable_sort_by_key

boost::compute::stable_sort_by_key

Synopsis

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


template<typename KeyIterator, typename ValueIterator, typename Compare> 
  void stable_sort_by_key(KeyIterator keys_first, KeyIterator keys_last, 
                          ValueIterator values_first, Compare compare, 
                          command_queue & queue = system::default_queue());
template<typename KeyIterator, typename ValueIterator> 
  void stable_sort_by_key(KeyIterator keys_first, KeyIterator keys_last, 
                          ValueIterator values_first, 
                          command_queue & queue = system::default_queue());

Description

Performs a key-value stable sort using the keys in the range [keys_first, keys_last) on the values in the range [values_first, values_first + (keys_last - keys_first)) using compare.

If no compare function is specified, less is used.

Space complexity: \Omega(2n)

See Also:

sort()


PrevUpHomeNext