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 a snapshot of the develop branch, built from commit 65ab21cc6f.
PrevUpHomeNext

Function template minmax_element

boost::compute::minmax_element

Synopsis

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


template<typename InputIterator, typename Compare> 
  std::pair< InputIterator, InputIterator > 
  minmax_element(InputIterator first, InputIterator last, Compare compare, 
                 command_queue & queue = system::default_queue());

Description

Returns a pair of iterators with the first pointing to the minimum element and the second pointing to the maximum element in the range [first, last).

Space complexity on CPUs: \Omega(1)
Space complexity on GPUs: \Omega(N)

See Also:

max_element(), min_element()

Parameters:

compare

comparison function object which returns true if the first argument is less than (i.e. is ordered before) the second.

first

first element in the input range

last

last element in the input range

queue

command queue to perform the operation


PrevUpHomeNext