| 257 | |
| 258 | template<class T> |
| 259 | void ensure_std_accumulate_equality(const std::vector<T> &data, |
| 260 | boost::compute::command_queue &queue) |
| 261 | { |
| 262 | boost::compute::mapped_view<T> view(&data[0], data.size(), queue.get_context()); |
| 263 | |
| 264 | BOOST_CHECK_EQUAL( |
| 265 | std::accumulate(data.begin(), data.end(), 0), |
| 266 | boost::compute::accumulate(view.begin(), view.end(), 0, queue) |
| 267 | ); |
| 268 | } |
| 269 | |
| 270 | BOOST_AUTO_TEST_CASE(std_accumulate_equality) |
| 271 | { |
no test coverage detected