]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/count.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / count.hpp
index 7a502c679128ed11fb5d4e55807973160cb3e041..bb46ee24c93cb78b4c314ea08f7b9c9dc4ec541b 100644 (file)
 #ifndef BOOST_COMPUTE_ALGORITHM_COUNT_HPP
 #define BOOST_COMPUTE_ALGORITHM_COUNT_HPP
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/lambda.hpp>
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/algorithm/count_if.hpp>
 #include <boost/compute/type_traits/vector_size.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -33,6 +36,7 @@ inline size_t count(InputIterator first,
                     const T &value,
                     command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     typedef typename std::iterator_traits<InputIterator>::value_type value_type;
 
     using ::boost::compute::_1;