1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
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
8 // See http://boostorg.github.com/compute for more information.
9 //---------------------------------------------------------------------------//
11 #ifndef BOOST_COMPUTE_TYPE_TRAITS_IS_DEVICE_ITERATOR_HPP
12 #define BOOST_COMPUTE_TYPE_TRAITS_IS_DEVICE_ITERATOR_HPP
14 #include <boost/type_traits/integral_constant.hpp>
19 /// Meta-function returning \c true if \c Iterator is a device-iterator.
21 /// By default, this function returns false. Device iterator types (such as
22 /// buffer_iterator) should specialize this trait and return \c true.
26 /// is_device_iterator<buffer_iterator<int>>::value == true
27 /// is_device_iterator<std::vector<int>::iterator>::value == false
29 template<class Iterator>
30 struct is_device_iterator : boost::false_type {};
33 template<class Iterator>
34 struct is_device_iterator<const Iterator> : is_device_iterator<Iterator> {};
36 } // end compute namespace
37 } // end boost namespace
39 #endif // BOOST_COMPUTE_TYPE_TRAITS_IS_DEVICE_ITERATOR_HPP