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

Function BOOST_AUTO_TEST_CASE

test/test_tabulate.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace compute = boost::compute;
24
25BOOST_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
37BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls 3

tabulateFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected