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

Function BOOST_AUTO_TEST_CASE

test/test_stable_partition.cpp:25–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace bc = boost::compute;
24
25BOOST_AUTO_TEST_CASE(partition_int)
26{
27 int dataset[] = {1, 1, -2, 0, 5, -1, 2, 4, 0, -1};
28 bc::vector<bc::int_> vector(dataset, dataset + 10, queue);
29
30 bc::vector<bc::int_>::iterator iter =
31 bc::stable_partition(vector.begin(), vector.begin() + 10,
32 bc::_1 > 0, queue);
33
34 CHECK_RANGE_EQUAL(int, 10, vector, (1, 1, 5, 2, 4, -2, 0, -1, 0, -1));
35 BOOST_VERIFY(iter == vector.begin()+5);
36}
37
38BOOST_AUTO_TEST_SUITE_END()

Callers

nothing calls this directly

Calls 2

stable_partitionFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected