| Home | Libraries | People | FAQ | More

## 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: |
`first` | first element in the input range
`last` | last element in the input range
`compare` | comparison function object which returns true if the first argument is less than (i.e. is ordered before) the second.
`queue` | command queue to perform the operation