MCPcopy Create free account
hub / github.com/boostorg/compute / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

test/test_partial_sum.cpp:28–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace bc = boost::compute;
27
28BOOST_AUTO_TEST_CASE(partial_sum_int)
29{
30 int data[] = { 1, 2, 5, 3, 9, 1, 4, 2 };
31 bc::vector<int> a(8, context);
32 bc::copy(data, data + 8, a.begin(), queue);
33
34 bc::vector<int> b(a.size(), context);
35 bc::vector<int>::iterator iter =
36 bc::partial_sum(a.begin(), a.end(), b.begin(), queue);
37 BOOST_CHECK(iter == b.end());
38 CHECK_RANGE_EQUAL(int, 8, b, (1, 3, 8, 11, 20, 21, 25, 27));
39}
40
41BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls 5

copyFunction · 0.85
partial_sumFunction · 0.85
beginMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected