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

Function BOOST_AUTO_TEST_CASE

compute/test/test_function.cpp:32–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30namespace compute = boost::compute;
31
32BOOST_AUTO_TEST_CASE(add_three)
33{
34 BOOST_COMPUTE_FUNCTION(int, add_three, (int x),
35 {
36 return x + 3;
37 });
38
39 int data[] = { 1, 2, 3, 4 };
40 compute::vector<int> vector(data, data + 4, queue);
41
42 compute::transform(
43 vector.begin(), vector.end(), vector.begin(), add_three, queue
44 );
45 CHECK_RANGE_EQUAL(int, 4, vector, (4, 5, 6, 7));
46}
47
48BOOST_AUTO_TEST_CASE(sum_odd_values)
49{

Callers

nothing calls this directly

Calls 14

transformFunction · 0.85
accumulateFunction · 0.85
make_pairFunction · 0.85
copyFunction · 0.85
sortFunction · 0.85
make_zip_iteratorFunction · 0.85
push_backMethod · 0.80
generateFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
vendorMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected