]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/max_element.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / max_element.hpp
index f9df37420c2532b316538dc59349fef6549af5a3..aa6fa1f674b9a98ab4929e435abe15495cfc7a40 100644 (file)
 #ifndef BOOST_COMPUTE_ALGORITHM_MAX_ELEMENT_HPP
 #define BOOST_COMPUTE_ALGORITHM_MAX_ELEMENT_HPP
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/functional.hpp>
 #include <boost/compute/algorithm/detail/find_extrema.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -54,6 +57,7 @@ max_element(InputIterator first,
             Compare compare,
             command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     return detail::find_extrema(first, last, compare, false, queue);
 }
 
@@ -64,6 +68,7 @@ max_element(InputIterator first,
             InputIterator last,
             command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     typedef typename std::iterator_traits<InputIterator>::value_type value_type;
 
     return ::boost::compute::max_element(