]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/gather.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / gather.hpp
index 62442587f7b272629234b81d40a01212d012f240..9d217837c3a7bf0ffe904f3f3bf82ca9e3d6d347 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef BOOST_COMPUTE_ALGORITHM_GATHER_HPP
 #define BOOST_COMPUTE_ALGORITHM_GATHER_HPP
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/detail/iterator_range_size.hpp>
 #include <boost/compute/detail/meta_kernel.hpp>
@@ -18,6 +20,7 @@
 #include <boost/compute/iterator/buffer_iterator.hpp>
 #include <boost/compute/system.hpp>
 #include <boost/compute/type_traits/type_name.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -72,6 +75,10 @@ inline void gather(MapIterator first,
                    OutputIterator result,
                    command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
+    BOOST_STATIC_ASSERT(is_device_iterator<MapIterator>::value);
+    BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
+
     detail::gather_kernel<InputIterator, MapIterator, OutputIterator> kernel;
     
     kernel.set_range(first, last, input, result);