123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #ifndef BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
- #define BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
- #include <boost/static_assert.hpp>
- #include <boost/compute/system.hpp>
- #include <boost/compute/command_queue.hpp>
- #include <boost/compute/algorithm/stable_partition.hpp>
- #include <boost/compute/type_traits/is_device_iterator.hpp>
- namespace boost {
- namespace compute {
- template<class Iterator, class UnaryPredicate>
- inline Iterator partition(Iterator first,
- Iterator last,
- UnaryPredicate predicate,
- command_queue &queue = system::default_queue())
- {
- BOOST_STATIC_ASSERT(is_device_iterator<Iterator>::value);
- return stable_partition(first, last, predicate, queue);
- }
- }
- }
- #endif
|