123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef BOOST_COMPUTE_ALGORITHM_FILL_N_HPP
- #define BOOST_COMPUTE_ALGORITHM_FILL_N_HPP
- #include <boost/static_assert.hpp>
- #include <boost/compute/system.hpp>
- #include <boost/compute/command_queue.hpp>
- #include <boost/compute/algorithm/fill.hpp>
- #include <boost/compute/type_traits/is_device_iterator.hpp>
- namespace boost {
- namespace compute {
- template<class BufferIterator, class Size, class T>
- inline void fill_n(BufferIterator first,
- Size count,
- const T &value,
- command_queue &queue = system::default_queue())
- {
- BOOST_STATIC_ASSERT(is_device_iterator<BufferIterator>::value);
- ::boost::compute::fill(first, first + count, value, queue);
- }
- }
- }
- #endif
|