]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/compute/algorithm/stable_sort.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / compute / algorithm / stable_sort.hpp
index 0857d75dc9f3809a248da129a58ccf856e488ec6..f5bb9a682bf25c587b70e1d4e23abf26c4f1099e 100644 (file)
@@ -13,6 +13,8 @@
 
 #include <iterator>
 
+#include <boost/static_assert.hpp>
+
 #include <boost/compute/system.hpp>
 #include <boost/compute/command_queue.hpp>
 #include <boost/compute/algorithm/detail/merge_sort_on_cpu.hpp>
@@ -22,6 +24,7 @@
 #include <boost/compute/algorithm/reverse.hpp>
 #include <boost/compute/functional/operator.hpp>
 #include <boost/compute/detail/iterator_range_size.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
 
 namespace boost {
 namespace compute {
@@ -81,6 +84,8 @@ inline void stable_sort(Iterator first,
                         Compare compare,
                         command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<Iterator>::value);
+
     if(queue.get_device().type() & device::gpu) {
         ::boost::compute::detail::dispatch_gpu_stable_sort(
             first, last, compare, queue
@@ -96,6 +101,7 @@ inline void stable_sort(Iterator first,
                         Iterator last,
                         command_queue &queue = system::default_queue())
 {
+    BOOST_STATIC_ASSERT(is_device_iterator<Iterator>::value);
     typedef typename std::iterator_traits<Iterator>::value_type value_type;
 
     ::boost::compute::less<value_type> less;