30 #ifndef HIPCUB_CUB_DEVICE_DEVICE_MERGE_SORT_HPP_
31 #define HIPCUB_CUB_DEVICE_DEVICE_MERGE_SORT_HPP_
33 #include "../../../config.hpp"
35 #include <cub/device/device_merge_sort.cuh>
37 BEGIN_HIPCUB_NAMESPACE
41 template<
typename KeyIteratorT,
typename ValueIteratorT,
typename OffsetT,
typename CompareOpT>
42 HIPCUB_RUNTIME_FUNCTION
static hipError_t SortPairs(
void * d_temp_storage,
43 std::size_t & temp_storage_bytes,
45 ValueIteratorT d_items,
47 CompareOpT compare_op,
48 hipStream_t stream = 0,
49 bool debug_synchronous =
false)
51 (void)debug_synchronous;
52 return hipCUDAErrorTohipError(::cub::DeviceMergeSort::SortPairs(d_temp_storage,
61 template<
typename KeyInputIteratorT,
62 typename ValueInputIteratorT,
63 typename KeyIteratorT,
64 typename ValueIteratorT,
67 HIPCUB_RUNTIME_FUNCTION
static hipError_t SortPairsCopy(
void * d_temp_storage,
68 std::size_t & temp_storage_bytes,
69 KeyInputIteratorT d_input_keys,
70 ValueInputIteratorT d_input_items,
71 KeyIteratorT d_output_keys,
72 ValueIteratorT d_output_items,
74 CompareOpT compare_op,
75 hipStream_t stream = 0,
76 bool debug_synchronous =
false)
78 (void)debug_synchronous;
79 return hipCUDAErrorTohipError(::cub::DeviceMergeSort::SortPairsCopy(d_temp_storage,
90 template<
typename KeyIteratorT,
typename OffsetT,
typename CompareOpT>
91 HIPCUB_RUNTIME_FUNCTION
static hipError_t SortKeys(
void * d_temp_storage,
92 std::size_t & temp_storage_bytes,
95 CompareOpT compare_op,
96 hipStream_t stream = 0,
97 bool debug_synchronous =
false)
99 (void)debug_synchronous;
100 return hipCUDAErrorTohipError(::cub::DeviceMergeSort::SortKeys(d_temp_storage,
108 template<
typename KeyInputIteratorT,
109 typename KeyIteratorT,
112 HIPCUB_RUNTIME_FUNCTION
static hipError_t SortKeysCopy(
void * d_temp_storage,
113 std::size_t & temp_storage_bytes,
114 KeyInputIteratorT d_input_keys,
115 KeyIteratorT d_output_keys,
117 CompareOpT compare_op,
118 hipStream_t stream = 0,
119 bool debug_synchronous =
false)
122 (void)debug_synchronous;
123 return hipCUDAErrorTohipError(::cub::DeviceMergeSort::SortKeysCopy(d_temp_storage,
132 template<
typename KeyIteratorT,
typename ValueIteratorT,
typename OffsetT,
typename CompareOpT>
133 HIPCUB_RUNTIME_FUNCTION
static hipError_t StableSortPairs(
void* d_temp_storage,
134 std::size_t& temp_storage_bytes,
136 ValueIteratorT d_items,
138 CompareOpT compare_op,
139 hipStream_t stream = 0,
140 bool debug_synchronous =
false)
142 (void)debug_synchronous;
143 return hipCUDAErrorTohipError(::cub::DeviceMergeSort::StableSortPairs(d_temp_storage,
152 template<
typename KeyIteratorT,
typename OffsetT,
typename CompareOpT>
153 HIPCUB_RUNTIME_FUNCTION
static hipError_t StableSortKeys(
void * d_temp_storage,
154 std::size_t & temp_storage_bytes,
157 CompareOpT compare_op,
158 hipStream_t stream = 0,
159 bool debug_synchronous =
false)
161 (void)debug_synchronous;
162 return hipCUDAErrorTohipError(::cub::DeviceMergeSort::StableSortKeys(d_temp_storage,
Definition: device_merge_sort.hpp:40