]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/minmax_element.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / minmax_element.hpp
index 4b2aae6dee82058d5c8201a147d4cd909f6b4ce7..ab1614f3fa83a902a737d3aadf038131d1c2d43e 100644 (file)
 
 #include <utility>
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/algorithm/max_element.hpp>
 #include <boost/compute/algorithm/min_element.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -42,6 +45,7 @@ minmax_element(InputIterator first,
                Compare compare,
                command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     if(first == last){
         // empty range
         return std::make_pair(first, first);
@@ -58,6 +62,7 @@ minmax_element(InputIterator first,
                InputIterator last,
                command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     if(first == last){
         // empty range
         return std::make_pair(first, first);