summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/count.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/count.hpp')
-rw-r--r--boost/compute/algorithm/count.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/boost/compute/algorithm/count.hpp b/boost/compute/algorithm/count.hpp
index 7a502c6791..bb46ee24c9 100644
--- a/boost/compute/algorithm/count.hpp
+++ b/boost/compute/algorithm/count.hpp
@@ -11,11 +11,14 @@
#ifndef BOOST_COMPUTE_ALGORITHM_COUNT_HPP
#define BOOST_COMPUTE_ALGORITHM_COUNT_HPP
+#include <boost/static_assert.hpp>
+
#include <boost/compute/lambda.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/count_if.hpp>
#include <boost/compute/type_traits/vector_size.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -33,6 +36,7 @@ inline size_t count(InputIterator first,
const T &value,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
using ::boost::compute::_1;