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

Function dispatch_gpu_sort

include/boost/compute/algorithm/sort.hpp:35–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34template<class T>
35inline 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
57template<class T>
58inline void dispatch_gpu_sort(buffer_iterator<T> first,

Callers 1

dispatch_sortFunction · 0.85

Calls 4

iterator_range_sizeFunction · 0.85
serial_insertion_sortFunction · 0.85
radix_sortFunction · 0.85
merge_sort_on_gpuFunction · 0.85

Tested by

no test coverage detected