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

Function BOOST_AUTO_TEST_CASE

compute/test/test_iota.cpp:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace bc = boost::compute;
24
25BOOST_AUTO_TEST_CASE(iota_int)
26{
27 bc::vector<int> vector(4, context);
28 bc::iota(vector.begin(), vector.end(), 0, queue);
29 CHECK_RANGE_EQUAL(int, 4, vector, (0, 1, 2, 3));
30
31 bc::iota(vector.begin(), vector.end(), 10, queue);
32 CHECK_RANGE_EQUAL(int, 4, vector, (10, 11, 12, 13));
33
34 bc::iota(vector.begin() + 2, vector.end(), -5, queue);
35 CHECK_RANGE_EQUAL(int, 4, vector, (10, 11, -5, -4));
36
37 bc::iota(vector.begin(), vector.end() - 2, 4, queue);
38 CHECK_RANGE_EQUAL(int, 4, vector, (4, 5, -5, -4));
39}
40
41BOOST_AUTO_TEST_CASE(iota_doctest)
42{

Callers

nothing calls this directly

Calls 6

iotaFunction · 0.85
CHECK_RANGE_EQUALFunction · 0.70
fillFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected