| 24 | |
| 25 | template<class T, class Policy, class Generator> |
| 26 | void test_remove_copy(Policy&& pol, Generator&& gen, std::size_t problem_size, |
| 27 | const T &value) { |
| 28 | std::vector<T> data(problem_size); |
| 29 | for(int i = 0; i < problem_size; ++i) { |
| 30 | data[i] = gen(i); |
| 31 | } |
| 32 | |
| 33 | std::vector<int> dest_device(problem_size); |
| 34 | std::vector<int> dest_host(problem_size); |
| 35 | |
| 36 | auto ret = std::remove_copy(pol, data.begin(), |
| 37 | data.end(), dest_device.begin(), value); |
| 38 | auto ret_reference = std::remove_copy(data.begin(), data.end(), |
| 39 | dest_host.begin(), value); |
| 40 | |
| 41 | BOOST_CHECK(std::distance(dest_device.begin(), ret) == |
| 42 | std::distance(dest_host.begin(), ret_reference)); |
| 43 | |
| 44 | BOOST_CHECK(dest_device == dest_host); |
| 45 | |
| 46 | } |
| 47 | |
| 48 | using types = boost::mp11::mp_list<int>; |
| 49 | BOOST_AUTO_TEST_CASE_TEMPLATE(par_unseq_empty, T, types) { |
nothing calls this directly
no test coverage detected