| 26 | namespace bc = boost::compute; |
| 27 | |
| 28 | BOOST_AUTO_TEST_CASE(partial_sum_int) |
| 29 | { |
| 30 | int data[] = { 1, 2, 5, 3, 9, 1, 4, 2 }; |
| 31 | bc::vector<int> a(8, context); |
| 32 | bc::copy(data, data + 8, a.begin(), queue); |
| 33 | |
| 34 | bc::vector<int> b(a.size(), context); |
| 35 | bc::vector<int>::iterator iter = |
| 36 | bc::partial_sum(a.begin(), a.end(), b.begin(), queue); |
| 37 | BOOST_CHECK(iter == b.end()); |
| 38 | CHECK_RANGE_EQUAL(int, 8, b, (1, 3, 8, 11, 20, 21, 25, 27)); |
| 39 | } |
| 40 | |
| 41 | BOOST_AUTO_TEST_SUITE_END() |
nothing calls this directly
no test coverage detected