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

Function BOOST_AUTO_TEST_CASE

test/test_lambda.cpp:34–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace compute = boost::compute;
33
34BOOST_AUTO_TEST_CASE(squared_plus_one)
35{
36 bc::vector<int> vector(context);
37 vector.push_back(1, queue);
38 vector.push_back(2, queue);
39 vector.push_back(3, queue);
40 vector.push_back(4, queue);
41 vector.push_back(5, queue);
42
43 // multiply each value by itself and add one
44 bc::transform(vector.begin(),
45 vector.end(),
46 vector.begin(),
47 (bc::_1 * bc::_1) + 1,
48 queue);
49 CHECK_RANGE_EQUAL(int, 5, vector, (2, 5, 10, 17, 26));
50}
51
52BOOST_AUTO_TEST_CASE(abs_int)
53{

Callers

nothing calls this directly

Calls 10

transformFunction · 0.85
make_pairFunction · 0.85
copyFunction · 0.85
for_eachFunction · 0.85
make_zip_iteratorFunction · 0.85
copy_nFunction · 0.85
bindFunction · 0.85
push_backMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected