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

Function BOOST_AUTO_TEST_CASE

test/test_functional_bind.cpp:45–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43using compute::placeholders::_2;
44
45BOOST_AUTO_TEST_CASE(transform_plus_two)
46{
47 int data[] = { 1, 2, 3, 4 };
48 compute::vector<int> vector(4, context);
49 compute::copy_n(data, 4, vector.begin(), queue);
50
51 compute::transform(
52 vector.begin(), vector.end(), vector.begin(),
53 compute::bind(compute::plus<int>(), _1, 2),
54 queue
55 );
56
57 CHECK_RANGE_EQUAL(int, 4, vector, (3, 4, 5, 6));
58}
59
60BOOST_AUTO_TEST_CASE(transform_pow_two)
61{

Callers

nothing calls this directly

Calls 8

copy_nFunction · 0.85
transformFunction · 0.85
bindFunction · 0.85
copyFunction · 0.85
find_ifFunction · 0.85
count_ifFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected