]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/iota.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / iota.hpp
index 4cd7aa9c7b1ce4f83496fa090c941ff3d0da57d7..d0916500b5896f396eceb2f803d3744105355fd1 100644 (file)
 #ifndef BOOST_COMPUTE_ALGORITHM_IOTA_HPP
 #define BOOST_COMPUTE_ALGORITHM_IOTA_HPP
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/algorithm/copy.hpp>
 #include <boost/compute/iterator/counting_iterator.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -34,6 +37,7 @@ inline void iota(BufferIterator first,
                  const T &value,
                  command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<BufferIterator>::value);
     T count = static_cast<T>(detail::iterator_range_size(first, last));
 
     copy(