| 22 | namespace bc = boost::compute; |
| 23 | |
| 24 | BOOST_AUTO_TEST_CASE(set_intersection_int) |
| 25 | { |
| 26 | int dataset1[] = {1, 1, 2, 2, 2, 2, 3, 3, 4, 5, 6, 10}; |
| 27 | bc::vector<bc::int_> set1(dataset1, dataset1 + 12, queue); |
| 28 | |
| 29 | int dataset2[] = {0, 2, 2, 4, 5, 6, 8, 8, 9, 9, 9, 13}; |
| 30 | bc::vector<bc::int_> set2(dataset2, dataset2 + 12, queue); |
| 31 | |
| 32 | bc::vector<bc::uint_>result(10, queue.get_context()); |
| 33 | |
| 34 | bc::vector<bc::uint_>::iterator iter = |
| 35 | bc::set_intersection(set1.begin(), set1.begin() + 12, |
| 36 | set2.begin(), set2.begin() + 12, |
| 37 | result.begin(), queue); |
| 38 | |
| 39 | CHECK_RANGE_EQUAL(int, 5, result, (2, 2, 4, 5, 6)); |
| 40 | BOOST_VERIFY(iter == result.begin()+5); |
| 41 | } |
| 42 | |
| 43 | BOOST_AUTO_TEST_CASE(set_intersection_string) |
| 44 | { |
nothing calls this directly
no test coverage detected