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

Function CHECK_RANGE_EQUAL

compute/test/test_scatter_if.cpp:107–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 queue);
106
107 CHECK_RANGE_EQUAL(int, 10, output, (9, 8, 7, 6, -1, -1, -1, -1, -1, -1) );
108}
109
110
111BOOST_AUTO_TEST_CASE(scatter_if_counting_iterator)
112{
113 int input_data[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
114 bc::vector<int> input(input_data, input_data + 10, queue);
115
116 int map_data[] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
117 bc::vector<int> map(map_data, map_data + 10, queue);
118
119 bc::vector<int> output(input.size(), -1, queue);
120
121 BOOST_COMPUTE_FUNCTION(int, gt_than_5, (int x),
122 {
123 if (x > 5)
124 return true;
125 else
126 return false;
127 });
128
129 bc::scatter_if(input.begin(),
130 input.end(),

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected