]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/unique.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / unique.hpp
index 8b7e2a0d0de929e0def1d2b93f8ce03caff5f442..2d5cf1e409f28ea93bd6f776653ff5896948a1db 100644 (file)
 #ifndef BOOST_COMPUTE_ALGORITHM_UNIQUE_HPP
 #define BOOST_COMPUTE_ALGORITHM_UNIQUE_HPP
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/algorithm/unique_copy.hpp>
 #include <boost/compute/container/vector.hpp>
 #include <boost/compute/functional/operator.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -40,6 +43,7 @@ inline InputIterator unique(InputIterator first,
                             BinaryPredicate op,
                             command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     typedef typename std::iterator_traits<InputIterator>::value_type value_type;
 
     vector<value_type> temp(first, last, queue);
@@ -55,6 +59,7 @@ inline InputIterator unique(InputIterator first,
                             InputIterator last,
                             command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
     typedef typename std::iterator_traits<InputIterator>::value_type value_type;
 
     return ::boost::compute::unique(