MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

compute/test/test_lambda.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 13

transformFunction · 0.85
make_pairFunction · 0.85
make_transform_iteratorFunction · 0.85
has_remquo_funcFunction · 0.85
make_zip_iteratorFunction · 0.85
copyFunction · 0.85
for_eachFunction · 0.85
copy_nFunction · 0.85
bindFunction · 0.85
push_backMethod · 0.80
CHECK_RANGE_EQUALFunction · 0.70
beginMethod · 0.45

Tested by

no test coverage detected