]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/reduce.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / reduce.hpp
index e71d90fe2492a854b274abb7884b802c3d0e3f4f..a794cea495925717036018dea25eb27b7d5f3333 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <iterator>
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/functional.hpp>
 #include <boost/compute/detail/meta_kernel.hpp>
@@ -26,6 +28,7 @@
 #include <boost/compute/detail/iterator_range_size.hpp>
 #include <boost/compute/memory/local_buffer.hpp>
 #include <boost/compute/type_traits/result_of.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -276,6 +279,7 @@ inline void reduce(InputIterator first,
                    BinaryFunction function,
                    command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     if(first == last){
         return;
     }
@@ -290,6 +294,7 @@ inline void reduce(InputIterator first,
                    OutputIterator result,
                    command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     typedef typename std::iterator_traits<InputIterator>::value_type T;
 
     if(first == last){