| 23 | namespace compute = boost::compute; |
| 24 | |
| 25 | BOOST_AUTO_TEST_CASE(tabulate_negative_int) |
| 26 | { |
| 27 | BOOST_COMPUTE_FUNCTION(int, negate, (int x), |
| 28 | { |
| 29 | return -x; |
| 30 | }); |
| 31 | |
| 32 | compute::vector<int> vector(10, context); |
| 33 | compute::experimental::tabulate(vector.begin(), vector.end(), negate, queue); |
| 34 | CHECK_RANGE_EQUAL(int, 10, vector, (0, -1, -2, -3, -4, -5, -6, -7, -8, -9)); |
| 35 | } |
| 36 | |
| 37 | BOOST_AUTO_TEST_SUITE_END() |