]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/compute/detail/iterator_traits.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / compute / detail / iterator_traits.hpp
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
3 //
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
7 //
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
10
11 #ifndef BOOST_COMPUTE_DETAIL_ITERATOR_TRAITS_HPP
12 #define BOOST_COMPUTE_DETAIL_ITERATOR_TRAITS_HPP
13
14 #include <iterator>
15
16 #include <boost/compute/detail/is_contiguous_iterator.hpp>
17 #include <boost/compute/type_traits/is_device_iterator.hpp>
18
19 namespace boost {
20 namespace compute {
21 namespace detail {
22
23 template<class Iterator>
24 struct iterator_traits : public std::iterator_traits<Iterator>
25 {
26 static const bool is_contiguous = is_contiguous_iterator<Iterator>::value;
27 static const bool is_on_device = is_device_iterator<Iterator>::value;
28 static const bool is_on_host = !is_on_device;
29 };
30
31 } // end detail namespace
32 } // end compute namespace
33 } // end boost namespace
34
35 #endif // BOOST_COMPUTE_ITERATOR_TRAITS_HPP