| 20 | #include "context_setup.hpp" |
| 21 | |
| 22 | BOOST_AUTO_TEST_CASE(rotate_trivial) |
| 23 | { |
| 24 | int data[] = {1, 4, 2, 6, 3, 2, 5, 3, 4, 6}; |
| 25 | boost::compute::vector<int> vector(10, context); |
| 26 | |
| 27 | boost::compute::copy_n(data, 10, vector.begin(), queue); |
| 28 | |
| 29 | boost::compute::rotate(vector.begin(), vector.begin(), vector.end()); |
| 30 | CHECK_RANGE_EQUAL(int, 10, vector, (1, 4, 2, 6, 3, 2, 5, 3, 4, 6)); |
| 31 | |
| 32 | boost::compute::rotate(vector.begin(), vector.end(), vector.end()); |
| 33 | CHECK_RANGE_EQUAL(int, 10, vector, (1, 4, 2, 6, 3, 2, 5, 3, 4, 6)); |
| 34 | } |
| 35 | |
| 36 | BOOST_AUTO_TEST_CASE(rotate_1) |
| 37 | { |