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

Function BOOST_AUTO_TEST_CASE

compute/test/test_rotate_copy.cpp:22–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include "context_setup.hpp"
21
22BOOST_AUTO_TEST_CASE(rotate_copy_trivial)
23{
24 int data[] = {1, 4, 2, 6, 3, 2, 5, 3, 4, 6};
25 boost::compute::vector<int> vector(10, context);
26 boost::compute::vector<int> result(10, context);
27
28 boost::compute::copy_n(data, 10, vector.begin(), queue);
29
30 boost::compute::rotate_copy(vector.begin(), vector.begin(), vector.end(), result.begin(), queue);
31 CHECK_RANGE_EQUAL(int, 10, result, (1, 4, 2, 6, 3, 2, 5, 3, 4, 6));
32
33 boost::compute::rotate_copy(vector.begin(), vector.end(), vector.end(), result.begin(), queue);
34 CHECK_RANGE_EQUAL(int, 10, result, (1, 4, 2, 6, 3, 2, 5, 3, 4, 6));
35}
36
37BOOST_AUTO_TEST_CASE(rotate_copy_1)
38{

Callers

nothing calls this directly

Calls 4

copy_nFunction · 0.85
rotate_copyFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected