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

Function BOOST_AUTO_TEST_CASE

compute/test/test_accumulate.cpp:25–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23#include "context_setup.hpp"
24
25BOOST_AUTO_TEST_CASE(sum_int)
26{
27 int data[] = { 2, 4, 6, 8 };
28 boost::compute::vector<int> vector(data, data + 4, queue);
29 BOOST_CHECK_EQUAL(
30 boost::compute::accumulate(vector.begin(), vector.end(), 0, queue),
31 20
32 );
33
34 BOOST_CHECK_EQUAL(
35 boost::compute::accumulate(vector.begin(), vector.end(), -10, queue),
36 10
37 );
38
39 BOOST_CHECK_EQUAL(
40 boost::compute::accumulate(vector.begin(), vector.end(), 5, queue),
41 25
42 );
43}
44
45BOOST_AUTO_TEST_CASE(product_int)
46{

Callers

nothing calls this directly

Calls 10

accumulateFunction · 0.85
make_counting_iteratorFunction · 0.85
iotaFunction · 0.85
BOOST_COMPUTE_FUNCTIONFunction · 0.70
fillFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
resizeMethod · 0.45
supports_extensionMethod · 0.45

Tested by

no test coverage detected