MCPcopy Create free account
hub / github.com/boostorg/compute / minmax_element

Function minmax_element

include/boost/compute/algorithm/minmax_element.hpp:42–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40/// \see max_element(), min_element()
41template<class InputIterator, class Compare>
42inline std::pair<InputIterator, InputIterator>
43minmax_element(InputIterator first,
44 InputIterator last,
45 Compare compare,
46 command_queue &queue = system::default_queue())
47{
48 BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
49 if(first == last){
50 // empty range
51 return std::make_pair(first, first);
52 }
53
54 return std::make_pair(min_element(first, last, compare, queue),
55 max_element(first, last, compare, queue));
56}
57
58///\overload
59template<class InputIterator>

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

make_pairFunction · 0.85
min_elementFunction · 0.85
max_elementFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68