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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function sort_by_key

boost::compute::sort_by_key

Synopsis

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


template<typename KeyIterator, typename ValueIterator, typename Compare> 
  void 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 sort_by_key(KeyIterator keys_first, KeyIterator keys_last, 
                   ValueIterator values_first, 
                   command_queue & queue = system::default_queue());

Description

Performs a key-value 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: (2n)

See Also:

sort()


PrevUpHomeNext