| 30 | namespace compute = boost::compute; |
| 31 | |
| 32 | BOOST_AUTO_TEST_CASE(add_three) |
| 33 | { |
| 34 | BOOST_COMPUTE_FUNCTION(int, add_three, (int x), |
| 35 | { |
| 36 | return x + 3; |
| 37 | }); |
| 38 | |
| 39 | int data[] = { 1, 2, 3, 4 }; |
| 40 | compute::vector<int> vector(data, data + 4, queue); |
| 41 | |
| 42 | compute::transform( |
| 43 | vector.begin(), vector.end(), vector.begin(), add_three, queue |
| 44 | ); |
| 45 | CHECK_RANGE_EQUAL(int, 4, vector, (4, 5, 6, 7)); |
| 46 | } |
| 47 | |
| 48 | BOOST_AUTO_TEST_CASE(sum_odd_values) |
| 49 | { |
nothing calls this directly
no test coverage detected