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

Function BOOST_AUTO_TEST_CASE

test/test_copy.cpp:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace compute = boost::compute;
38
39BOOST_AUTO_TEST_CASE(copy_on_device)
40{
41 float data[] = { 6.1f, 10.2f, 19.3f, 25.4f };
42 bc::vector<float> a(4);
43 bc::copy(data, data + 4, a.begin(), queue);
44 CHECK_RANGE_EQUAL(float, 4, a, (6.1f, 10.2f, 19.3f, 25.4f));
45
46 bc::vector<float> b(4);
47 bc::fill(b.begin(), b.end(), 0, queue);
48 CHECK_RANGE_EQUAL(float, 4, b, (0.0f, 0.0f, 0.0f, 0.0f));
49
50 bc::copy(a.begin(), a.end(), b.begin(), queue);
51 CHECK_RANGE_EQUAL(float, 4, b, (6.1f, 10.2f, 19.3f, 25.4f));
52}
53
54BOOST_AUTO_TEST_CASE(copy_on_host)
55{

Callers

nothing calls this directly

Calls 15

copyFunction · 0.85
fillFunction · 0.85
copy_nFunction · 0.85
copy_asyncFunction · 0.85
iotaFunction · 0.85
bug_in_svmmemcpyFunction · 0.85
svm_freeFunction · 0.85
get_command_typeMethod · 0.80
push_backMethod · 0.80
CHECK_RANGE_EQUALFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected