| 27 | const bool descending = false; |
| 28 | |
| 29 | BOOST_AUTO_TEST_CASE(sort_char_vector) |
| 30 | { |
| 31 | if(is_apple_cpu_device(device)) { |
| 32 | std::cerr |
| 33 | << "skipping all radix_sort tests due to Apple platform" |
| 34 | << " behavior when local memory is used on a CPU device" |
| 35 | << std::endl; |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | using boost::compute::char_; |
| 40 | |
| 41 | char_ data[] = { 'c', 'a', '0', '7', 'B', 'F', '\0', '$' }; |
| 42 | boost::compute::vector<char_> vector(data, data + 8, queue); |
| 43 | BOOST_CHECK_EQUAL(vector.size(), size_t(8)); |
| 44 | BOOST_CHECK(boost::compute::is_sorted(vector.begin(), vector.end(), queue) == false); |
| 45 | |
| 46 | boost::compute::detail::radix_sort(vector.begin(), vector.end(), queue); |
| 47 | BOOST_CHECK(boost::compute::is_sorted(vector.begin(), vector.end(), queue) == true); |
| 48 | CHECK_RANGE_EQUAL(char_, 8, vector, ('\0', '$', '0', '7', 'B', 'F', 'a', 'c')); |
| 49 | } |
| 50 | |
| 51 | BOOST_AUTO_TEST_CASE(sort_uchar_vector) |
| 52 | { |
nothing calls this directly
no test coverage detected