| 18 | #include "context_setup.hpp" |
| 19 | |
| 20 | BOOST_AUTO_TEST_CASE(mismatch_int) |
| 21 | { |
| 22 | int data1[] = { 1, 2, 3, 4, 5, 6 }; |
| 23 | int data2[] = { 1, 2, 3, 7, 5, 6 }; |
| 24 | |
| 25 | boost::compute::vector<int> vector1(data1, data1 + 6, queue); |
| 26 | boost::compute::vector<int> vector2(data2, data2 + 6, queue); |
| 27 | |
| 28 | typedef boost::compute::vector<int>::iterator iter; |
| 29 | |
| 30 | std::pair<iter, iter> location = |
| 31 | boost::compute::mismatch(vector1.begin(), vector1.end(), |
| 32 | vector2.begin(), queue); |
| 33 | BOOST_CHECK(location.first == vector1.begin() + 3); |
| 34 | BOOST_CHECK_EQUAL(int(*location.first), int(4)); |
| 35 | BOOST_CHECK(location.second == vector2.begin() + 3); |
| 36 | BOOST_CHECK_EQUAL(int(*location.second), int(7)); |
| 37 | } |
| 38 | |
| 39 | BOOST_AUTO_TEST_CASE(mismatch_different_range_sizes) |
| 40 | { |