summaryrefslogtreecommitdiff
path: root/boost/compute/algorithm/set_difference.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/compute/algorithm/set_difference.hpp')
-rw-r--r--boost/compute/algorithm/set_difference.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/boost/compute/algorithm/set_difference.hpp b/boost/compute/algorithm/set_difference.hpp
index 85a846ba13..f48792c318 100644
--- a/boost/compute/algorithm/set_difference.hpp
+++ b/boost/compute/algorithm/set_difference.hpp
@@ -13,6 +13,8 @@
#include <iterator>
+#include <boost/static_assert.hpp>
+
#include <boost/compute/algorithm/detail/compact.hpp>
#include <boost/compute/algorithm/detail/balanced_path.hpp>
#include <boost/compute/algorithm/exclusive_scan.hpp>
@@ -21,6 +23,7 @@
#include <boost/compute/detail/iterator_range_size.hpp>
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/system.hpp>
+#include <boost/compute/type_traits/is_device_iterator.hpp>
namespace boost {
namespace compute {
@@ -132,6 +135,10 @@ inline OutputIterator set_difference(InputIterator1 first1,
OutputIterator result,
command_queue &queue = system::default_queue())
{
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator1>::value);
+ BOOST_STATIC_ASSERT(is_device_iterator<InputIterator2>::value);
+ BOOST_STATIC_ASSERT(is_device_iterator<OutputIterator>::value);
+
typedef typename std::iterator_traits<InputIterator1>::value_type value_type;
int tile_size = 1024;