]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/search.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / search.hpp
index a1f3dece620c9f5521e58b51700c39271922c842..72bbf5efa8e54cd195f6f476af3817cd65310387 100644 (file)
 #ifndef BOOST_COMPUTE_ALGORITHM_SEARCH_HPP
 #define BOOST_COMPUTE_ALGORITHM_SEARCH_HPP
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/algorithm/detail/search_all.hpp>
 #include <boost/compute/algorithm/find.hpp>
 #include <boost/compute/container/vector.hpp>
 #include <boost/compute/detail/iterator_range_size.hpp>
 #include <boost/compute/detail/meta_kernel.hpp>
 #include <boost/compute/system.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -42,6 +45,9 @@ inline TextIterator search(TextIterator t_first,
                            PatternIterator p_last,
                            command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<TextIterator>::value);
+    BOOST_STATIC_ASSERT(is_device_iterator<PatternIterator>::value);
+
     // there is no need to check if pattern starts at last n - 1 indices
     vector<uint_> matching_indices(
         detail::iterator_range_size(t_first, t_last)