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

Function BOOST_AUTO_TEST_CASE

compute/test/test_mapped_view.cpp:25–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace compute = boost::compute;
24
25BOOST_AUTO_TEST_CASE(fill)
26{
27 int data[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
28 for(int i = 0; i < 8; i++){
29 BOOST_CHECK_EQUAL(data[i], i+1);
30 }
31
32 compute::mapped_view<int> view(data, 8, context);
33 compute::fill(view.begin(), view.end(), 4, queue);
34
35 view.map(CL_MAP_READ, queue);
36 for(int i = 0; i < 8; i++){
37 BOOST_CHECK_EQUAL(data[i], 4);
38 }
39 view.unmap(queue);
40}
41
42BOOST_AUTO_TEST_CASE(sort)
43{

Callers

nothing calls this directly

Calls 7

sortFunction · 0.85
reduceFunction · 0.85
mapMethod · 0.80
unmapMethod · 0.80
fillFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected