Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:04:25

0001 //---------------------------------------------------------------------------//
0002 // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
0003 //
0004 // Distributed under the Boost Software License, Version 1.0
0005 // See accompanying file LICENSE_1_0.txt or copy at
0006 // http://www.boost.org/LICENSE_1_0.txt
0007 //
0008 // See http://boostorg.github.com/compute for more information.
0009 //---------------------------------------------------------------------------//
0010 
0011 #ifndef BOOST_COMPUTE_DETAIL_ITERATOR_TRAITS_HPP
0012 #define BOOST_COMPUTE_DETAIL_ITERATOR_TRAITS_HPP
0013 
0014 #include <iterator>
0015 
0016 #include <boost/compute/detail/is_contiguous_iterator.hpp>
0017 #include <boost/compute/type_traits/is_device_iterator.hpp>
0018 
0019 namespace boost {
0020 namespace compute {
0021 namespace detail {
0022 
0023 template<class Iterator>
0024 struct iterator_traits : public std::iterator_traits<Iterator>
0025 {
0026     static const bool is_contiguous = is_contiguous_iterator<Iterator>::value;
0027     static const bool is_on_device = is_device_iterator<Iterator>::value;
0028     static const bool is_on_host = !is_on_device;
0029 };
0030 
0031 } // end detail namespace
0032 } // end compute namespace
0033 } // end boost namespace
0034 
0035 #endif // BOOST_COMPUTE_ITERATOR_TRAITS_HPP