| 23 | #include "context_setup.hpp" |
| 24 | |
| 25 | BOOST_AUTO_TEST_CASE(sum_int) |
| 26 | { |
| 27 | int data[] = { 2, 4, 6, 8 }; |
| 28 | boost::compute::vector<int> vector(data, data + 4, queue); |
| 29 | BOOST_CHECK_EQUAL( |
| 30 | boost::compute::accumulate(vector.begin(), vector.end(), 0, queue), |
| 31 | 20 |
| 32 | ); |
| 33 | |
| 34 | BOOST_CHECK_EQUAL( |
| 35 | boost::compute::accumulate(vector.begin(), vector.end(), -10, queue), |
| 36 | 10 |
| 37 | ); |
| 38 | |
| 39 | BOOST_CHECK_EQUAL( |
| 40 | boost::compute::accumulate(vector.begin(), vector.end(), 5, queue), |
| 41 | 25 |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | BOOST_AUTO_TEST_CASE(product_int) |
| 46 | { |
nothing calls this directly
no test coverage detected