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

Function BOOST_AUTO_TEST_CASE

test/test_scatter.cpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace bc = boost::compute;
23
24BOOST_AUTO_TEST_CASE(scatter_int)
25{
26 int input_data[] = { 1, 2, 3, 4, 5 };
27 bc::vector<int> input(input_data, input_data + 5, queue);
28
29 int map_data[] = { 0, 4, 1, 3, 2 };
30 bc::vector<int> map(map_data, map_data + 5, queue);
31
32 bc::vector<int> output(5, context);
33 bc::scatter(input.begin(), input.end(), map.begin(), output.begin(), queue);
34 CHECK_RANGE_EQUAL(int, 5, output, (1, 3, 5, 4, 2));
35}
36
37BOOST_AUTO_TEST_CASE(scatter_constant_indices)
38{

Callers

nothing calls this directly

Calls 3

scatterFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected