| 37 | namespace compute = boost::compute; |
| 38 | |
| 39 | BOOST_AUTO_TEST_CASE(copy_on_device) |
| 40 | { |
| 41 | float data[] = { 6.1f, 10.2f, 19.3f, 25.4f }; |
| 42 | bc::vector<float> a(4); |
| 43 | bc::copy(data, data + 4, a.begin(), queue); |
| 44 | CHECK_RANGE_EQUAL(float, 4, a, (6.1f, 10.2f, 19.3f, 25.4f)); |
| 45 | |
| 46 | bc::vector<float> b(4); |
| 47 | bc::fill(b.begin(), b.end(), 0, queue); |
| 48 | CHECK_RANGE_EQUAL(float, 4, b, (0.0f, 0.0f, 0.0f, 0.0f)); |
| 49 | |
| 50 | bc::copy(a.begin(), a.end(), b.begin(), queue); |
| 51 | CHECK_RANGE_EQUAL(float, 4, b, (6.1f, 10.2f, 19.3f, 25.4f)); |
| 52 | } |
| 53 | |
| 54 | BOOST_AUTO_TEST_CASE(copy_on_host) |
| 55 | { |
nothing calls this directly
no test coverage detected