| 23 | namespace bc = boost::compute; |
| 24 | |
| 25 | BOOST_AUTO_TEST_CASE(iota_int) |
| 26 | { |
| 27 | bc::vector<int> vector(4, context); |
| 28 | bc::iota(vector.begin(), vector.end(), 0, queue); |
| 29 | CHECK_RANGE_EQUAL(int, 4, vector, (0, 1, 2, 3)); |
| 30 | |
| 31 | bc::iota(vector.begin(), vector.end(), 10, queue); |
| 32 | CHECK_RANGE_EQUAL(int, 4, vector, (10, 11, 12, 13)); |
| 33 | |
| 34 | bc::iota(vector.begin() + 2, vector.end(), -5, queue); |
| 35 | CHECK_RANGE_EQUAL(int, 4, vector, (10, 11, -5, -4)); |
| 36 | |
| 37 | bc::iota(vector.begin(), vector.end() - 2, 4, queue); |
| 38 | CHECK_RANGE_EQUAL(int, 4, vector, (4, 5, -5, -4)); |
| 39 | } |
| 40 | |
| 41 | BOOST_AUTO_TEST_CASE(iota_doctest) |
| 42 | { |
nothing calls this directly
no test coverage detected