File indexing completed on 2025-01-18 09:29:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_COMPUTE_ALGORITHM_ROTATE_COPY_HPP
0012 #define BOOST_COMPUTE_ALGORITHM_ROTATE_COPY_HPP
0013
0014 #include <boost/compute/system.hpp>
0015 #include <boost/compute/algorithm/copy.hpp>
0016
0017 namespace boost {
0018 namespace compute {
0019
0020
0021
0022
0023
0024
0025
0026 template<class InputIterator, class OutputIterator>
0027 inline void rotate_copy(InputIterator first,
0028 InputIterator n_first,
0029 InputIterator last,
0030 OutputIterator result,
0031 command_queue &queue = system::default_queue())
0032 {
0033 size_t count = detail::iterator_range_size(first, n_first);
0034 size_t count2 = detail::iterator_range_size(n_first, last);
0035
0036 ::boost::compute::copy(first+count, last, result, queue);
0037 ::boost::compute::copy(first, first+count, result+count2, queue);
0038 }
0039
0040 }
0041 }
0042
0043 #endif