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

Function BOOST_AUTO_TEST_CASE

test/test_rotate.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

copy_nFunction · 0.85
rotateFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected