Function minmax_element

| Home | Libraries | People | FAQ | More

## Function 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());
    template<typename InputIterator, typename Compare>
      std::pair< InputIterator, InputIterator >
      minmax_element(InputIterator first, InputIterator last,
                     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`).

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