| 33 | |
| 34 | template<class T> |
| 35 | inline void dispatch_gpu_sort(buffer_iterator<T> first, |
| 36 | buffer_iterator<T> last, |
| 37 | less<T>, |
| 38 | command_queue &queue, |
| 39 | typename boost::enable_if_c< |
| 40 | is_radix_sortable<T>::value |
| 41 | >::type* = 0) |
| 42 | { |
| 43 | size_t count = detail::iterator_range_size(first, last); |
| 44 | |
| 45 | if(count < 2){ |
| 46 | // nothing to do |
| 47 | return; |
| 48 | } |
| 49 | else if(count <= 32){ |
| 50 | ::boost::compute::detail::serial_insertion_sort(first, last, queue); |
| 51 | } |
| 52 | else { |
| 53 | ::boost::compute::detail::radix_sort(first, last, queue); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | template<class T> |
| 58 | inline void dispatch_gpu_sort(buffer_iterator<T> first, |
no test coverage detected