summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/transform_if.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/transform_if.hpp')
-rw-r--r--boost/compute/algorithm/transform_if.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/boost/compute/algorithm/transform_if.hpp b/boost/compute/algorithm/transform_if.hpp
index 9a98102d27..1f85720195 100644
--- a/boost/compute/algorithm/transform_if.hpp
+++ b/boost/compute/algorithm/transform_if.hpp
@@ -11,6 +11,8 @@
#ifndef BOOST_COMPUTE_ALGORITHM_TRANSFORM_IF_HPP
#define BOOST_COMPUTE_ALGORITHM_TRANSFORM_IF_HPP
+#include <boost/static_assert.hpp>
+
#include <boost/compute/cl.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
@@ -21,6 +23,7 @@
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
#include <boost/compute/iterator/discard_iterator.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -107,6 +110,8 @@ inline OutputIterator transform_if(InputIterator first,
Predicate predicate,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
+ BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
return detail::transform_if_impl(
first, last, result, function, predicate, false, queue
);