summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/exclusive_scan.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/exclusive_scan.hpp')
-rw-r--r--boost/compute/algorithm/exclusive_scan.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/boost/compute/algorithm/exclusive_scan.hpp b/boost/compute/algorithm/exclusive_scan.hpp
index 806a172cf4..f1059e406e 100644
--- a/boost/compute/algorithm/exclusive_scan.hpp
+++ b/boost/compute/algorithm/exclusive_scan.hpp
@@ -11,10 +11,13 @@
#ifndef BOOST_COMPUTE_ALGORITHM_EXCLUSIVE_SCAN_HPP
#define BOOST_COMPUTE_ALGORITHM_EXCLUSIVE_SCAN_HPP
+#include <boost/static_assert.hpp>
+
#include <boost/compute/functional.hpp>
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/detail/scan.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -58,6 +61,8 @@ exclusive_scan(InputIterator first,
BinaryOperator binary_op,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
+ BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
return detail::scan(first, last, result, true, init, binary_op, queue);
}
@@ -70,6 +75,8 @@ exclusive_scan(InputIterator first,
T init,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
+ BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
typedef typename
std::iterator_traits<OutputIterator>::value_type output_type;
@@ -86,6 +93,8 @@ exclusive_scan(InputIterator first,
OutputIterator result,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
+ BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
typedef typename
std::iterator_traits<OutputIterator>::value_type output_type;