30 #ifndef HIPCUB_CUB_DEVICE_DEVICE_SEGMENTED_SORT_HPP_
31 #define HIPCUB_CUB_DEVICE_DEVICE_SEGMENTED_SORT_HPP_
33 #include "../../../config.hpp"
35 #include <cub/device/device_segmented_sort.cuh>
37 BEGIN_HIPCUB_NAMESPACE
41 template <
typename KeyT,
42 typename BeginOffsetIteratorT,
43 typename EndOffsetIteratorT>
44 HIPCUB_RUNTIME_FUNCTION
static
45 hipError_t SortKeys(
void * d_temp_storage,
46 size_t& temp_storage_bytes,
47 const KeyT * d_keys_in,
51 BeginOffsetIteratorT d_begin_offsets,
52 EndOffsetIteratorT d_end_offsets,
53 hipStream_t stream = 0,
54 bool debug_synchronous =
false)
56 return hipCUDAErrorTohipError(
57 ::cub::DeviceSegmentedSort::SortKeys(
58 d_temp_storage, temp_storage_bytes,
59 d_keys_in, d_keys_out,
60 num_items, num_segments,
61 d_begin_offsets, d_end_offsets,
62 stream, debug_synchronous
67 template <
typename KeyT,
68 typename BeginOffsetIteratorT,
69 typename EndOffsetIteratorT>
70 HIPCUB_RUNTIME_FUNCTION
static
71 hipError_t SortKeysDescending(
void * d_temp_storage,
72 size_t& temp_storage_bytes,
73 const KeyT * d_keys_in,
77 BeginOffsetIteratorT d_begin_offsets,
78 EndOffsetIteratorT d_end_offsets,
79 hipStream_t stream = 0,
80 bool debug_synchronous =
false)
82 return hipCUDAErrorTohipError(
83 ::cub::DeviceSegmentedSort::SortKeysDescending(
84 d_temp_storage, temp_storage_bytes,
85 d_keys_in, d_keys_out,
86 num_items, num_segments,
87 d_begin_offsets, d_end_offsets,
88 stream, debug_synchronous
93 template <
typename KeyT,
94 typename BeginOffsetIteratorT,
95 typename EndOffsetIteratorT>
96 HIPCUB_RUNTIME_FUNCTION
static
97 hipError_t SortKeys(
void * d_temp_storage,
98 size_t& temp_storage_bytes,
102 BeginOffsetIteratorT d_begin_offsets,
103 EndOffsetIteratorT d_end_offsets,
104 hipStream_t stream = 0,
105 bool debug_synchronous =
false)
107 return hipCUDAErrorTohipError(
108 ::cub::DeviceSegmentedSort::SortKeys(
109 d_temp_storage, temp_storage_bytes,
111 num_items, num_segments,
112 d_begin_offsets, d_end_offsets,
113 stream, debug_synchronous
118 template <
typename KeyT,
119 typename BeginOffsetIteratorT,
120 typename EndOffsetIteratorT>
121 HIPCUB_RUNTIME_FUNCTION
static
122 hipError_t SortKeysDescending(
void * d_temp_storage,
123 size_t& temp_storage_bytes,
127 BeginOffsetIteratorT d_begin_offsets,
128 EndOffsetIteratorT d_end_offsets,
129 hipStream_t stream = 0,
130 bool debug_synchronous =
false)
132 return hipCUDAErrorTohipError(
133 ::cub::DeviceSegmentedSort::SortKeysDescending(
134 d_temp_storage, temp_storage_bytes,
136 num_items, num_segments,
137 d_begin_offsets, d_end_offsets,
138 stream, debug_synchronous
143 template <
typename KeyT,
144 typename BeginOffsetIteratorT,
145 typename EndOffsetIteratorT>
146 HIPCUB_RUNTIME_FUNCTION
static
147 hipError_t StableSortKeys(
void * d_temp_storage,
148 size_t& temp_storage_bytes,
149 const KeyT * d_keys_in,
153 BeginOffsetIteratorT d_begin_offsets,
154 EndOffsetIteratorT d_end_offsets,
155 hipStream_t stream = 0,
156 bool debug_synchronous =
false)
158 return hipCUDAErrorTohipError(
159 ::cub::DeviceSegmentedSort::StableSortKeys(
160 d_temp_storage, temp_storage_bytes,
161 d_keys_in, d_keys_out,
162 num_items, num_segments,
163 d_begin_offsets, d_end_offsets,
164 stream, debug_synchronous
169 template <
typename KeyT,
170 typename BeginOffsetIteratorT,
171 typename EndOffsetIteratorT>
172 HIPCUB_RUNTIME_FUNCTION
static
173 hipError_t StableSortKeysDescending(
void * d_temp_storage,
174 size_t& temp_storage_bytes,
175 const KeyT * d_keys_in,
179 BeginOffsetIteratorT d_begin_offsets,
180 EndOffsetIteratorT d_end_offsets,
181 hipStream_t stream = 0,
182 bool debug_synchronous =
false)
184 return hipCUDAErrorTohipError(
185 ::cub::DeviceSegmentedSort::StableSortKeysDescending(
186 d_temp_storage, temp_storage_bytes,
187 d_keys_in, d_keys_out,
188 num_items, num_segments,
189 d_begin_offsets, d_end_offsets,
190 stream, debug_synchronous
195 template <
typename KeyT,
196 typename BeginOffsetIteratorT,
197 typename EndOffsetIteratorT>
198 HIPCUB_RUNTIME_FUNCTION
static
199 hipError_t StableSortKeys(
void * d_temp_storage,
200 size_t& temp_storage_bytes,
204 BeginOffsetIteratorT d_begin_offsets,
205 EndOffsetIteratorT d_end_offsets,
206 hipStream_t stream = 0,
207 bool debug_synchronous =
false)
209 return hipCUDAErrorTohipError(
210 ::cub::DeviceSegmentedSort::StableSortKeys(
211 d_temp_storage, temp_storage_bytes,
213 num_items, num_segments,
214 d_begin_offsets, d_end_offsets,
215 stream, debug_synchronous
220 template <
typename KeyT,
221 typename BeginOffsetIteratorT,
222 typename EndOffsetIteratorT>
223 HIPCUB_RUNTIME_FUNCTION
static
224 hipError_t StableSortKeysDescending(
void * d_temp_storage,
225 size_t& temp_storage_bytes,
229 BeginOffsetIteratorT d_begin_offsets,
230 EndOffsetIteratorT d_end_offsets,
231 hipStream_t stream = 0,
232 bool debug_synchronous =
false)
234 return hipCUDAErrorTohipError(
235 ::cub::DeviceSegmentedSort::StableSortKeysDescending(
236 d_temp_storage, temp_storage_bytes,
238 num_items, num_segments,
239 d_begin_offsets, d_end_offsets,
240 stream, debug_synchronous
245 template <
typename KeyT,
247 typename BeginOffsetIteratorT,
248 typename EndOffsetIteratorT>
249 HIPCUB_RUNTIME_FUNCTION
static
250 hipError_t SortPairs(
void * d_temp_storage,
251 size_t& temp_storage_bytes,
252 const KeyT * d_keys_in,
254 const ValueT * d_values_in,
255 ValueT * d_values_out,
258 BeginOffsetIteratorT d_begin_offsets,
259 EndOffsetIteratorT d_end_offsets,
260 hipStream_t stream = 0,
261 bool debug_synchronous =
false)
263 return hipCUDAErrorTohipError(
264 ::cub::DeviceSegmentedSort::SortPairs(
265 d_temp_storage, temp_storage_bytes,
266 d_keys_in, d_keys_out,
267 d_values_in, d_values_out,
268 num_items, num_segments,
269 d_begin_offsets, d_end_offsets,
270 stream, debug_synchronous
275 template <
typename KeyT,
277 typename BeginOffsetIteratorT,
278 typename EndOffsetIteratorT>
279 HIPCUB_RUNTIME_FUNCTION
static
280 hipError_t SortPairsDescending(
void * d_temp_storage,
281 size_t& temp_storage_bytes,
282 const KeyT * d_keys_in,
284 const ValueT * d_values_in,
285 ValueT * d_values_out,
288 BeginOffsetIteratorT d_begin_offsets,
289 EndOffsetIteratorT d_end_offsets,
290 hipStream_t stream = 0,
291 bool debug_synchronous =
false)
293 return hipCUDAErrorTohipError(
294 ::cub::DeviceSegmentedSort::SortPairsDescending(
295 d_temp_storage, temp_storage_bytes,
296 d_keys_in, d_keys_out,
297 d_values_in, d_values_out,
298 num_items, num_segments,
299 d_begin_offsets, d_end_offsets,
300 stream, debug_synchronous
305 template <
typename KeyT,
307 typename BeginOffsetIteratorT,
308 typename EndOffsetIteratorT>
309 HIPCUB_RUNTIME_FUNCTION
static
310 hipError_t SortPairs(
void * d_temp_storage,
311 size_t& temp_storage_bytes,
316 BeginOffsetIteratorT d_begin_offsets,
317 EndOffsetIteratorT d_end_offsets,
318 hipStream_t stream = 0,
319 bool debug_synchronous =
false)
321 return hipCUDAErrorTohipError(
322 ::cub::DeviceSegmentedSort::SortPairs(
323 d_temp_storage, temp_storage_bytes,
325 num_items, num_segments,
326 d_begin_offsets, d_end_offsets,
327 stream, debug_synchronous
332 template <
typename KeyT,
334 typename BeginOffsetIteratorT,
335 typename EndOffsetIteratorT>
336 HIPCUB_RUNTIME_FUNCTION
static
337 hipError_t SortPairsDescending(
void * d_temp_storage,
338 size_t& temp_storage_bytes,
343 BeginOffsetIteratorT d_begin_offsets,
344 EndOffsetIteratorT d_end_offsets,
345 hipStream_t stream = 0,
346 bool debug_synchronous =
false)
348 return hipCUDAErrorTohipError(
349 ::cub::DeviceSegmentedSort::SortPairsDescending(
350 d_temp_storage, temp_storage_bytes,
352 num_items, num_segments,
353 d_begin_offsets, d_end_offsets,
354 stream, debug_synchronous
359 template <
typename KeyT,
361 typename BeginOffsetIteratorT,
362 typename EndOffsetIteratorT>
363 HIPCUB_RUNTIME_FUNCTION
static
364 hipError_t StableSortPairs(
void * d_temp_storage,
365 size_t& temp_storage_bytes,
366 const KeyT * d_keys_in,
368 const ValueT * d_values_in,
369 ValueT * d_values_out,
372 BeginOffsetIteratorT d_begin_offsets,
373 EndOffsetIteratorT d_end_offsets,
374 hipStream_t stream = 0,
375 bool debug_synchronous =
false)
377 return hipCUDAErrorTohipError(
378 ::cub::DeviceSegmentedSort::StableSortPairs(
379 d_temp_storage, temp_storage_bytes,
380 d_keys_in, d_keys_out,
381 d_values_in, d_values_out,
382 num_items, num_segments,
383 d_begin_offsets, d_end_offsets,
384 stream, debug_synchronous
389 template <
typename KeyT,
391 typename BeginOffsetIteratorT,
392 typename EndOffsetIteratorT>
393 HIPCUB_RUNTIME_FUNCTION
static
394 hipError_t StableSortPairsDescending(
void * d_temp_storage,
395 size_t& temp_storage_bytes,
396 const KeyT * d_keys_in,
398 const ValueT * d_values_in,
399 ValueT * d_values_out,
402 BeginOffsetIteratorT d_begin_offsets,
403 EndOffsetIteratorT d_end_offsets,
404 hipStream_t stream = 0,
405 bool debug_synchronous =
false)
407 return hipCUDAErrorTohipError(
408 ::cub::DeviceSegmentedSort::StableSortPairsDescending(
409 d_temp_storage, temp_storage_bytes,
410 d_keys_in, d_keys_out,
411 d_values_in, d_values_out,
412 num_items, num_segments,
413 d_begin_offsets, d_end_offsets,
414 stream, debug_synchronous
419 template <
typename KeyT,
421 typename BeginOffsetIteratorT,
422 typename EndOffsetIteratorT>
423 HIPCUB_RUNTIME_FUNCTION
static
424 hipError_t StableSortPairs(
void * d_temp_storage,
425 size_t& temp_storage_bytes,
430 BeginOffsetIteratorT d_begin_offsets,
431 EndOffsetIteratorT d_end_offsets,
432 hipStream_t stream = 0,
433 bool debug_synchronous =
false)
435 return hipCUDAErrorTohipError(
436 ::cub::DeviceSegmentedSort::StableSortPairs(
437 d_temp_storage, temp_storage_bytes,
439 num_items, num_segments,
440 d_begin_offsets, d_end_offsets,
441 stream, debug_synchronous
446 template <
typename KeyT,
448 typename BeginOffsetIteratorT,
449 typename EndOffsetIteratorT>
450 HIPCUB_RUNTIME_FUNCTION
static
451 hipError_t StableSortPairsDescending(
void * d_temp_storage,
452 size_t& temp_storage_bytes,
457 BeginOffsetIteratorT d_begin_offsets,
458 EndOffsetIteratorT d_end_offsets,
459 hipStream_t stream = 0,
460 bool debug_synchronous =
false)
462 return hipCUDAErrorTohipError(
463 ::cub::DeviceSegmentedSort::StableSortPairsDescending(
464 d_temp_storage, temp_storage_bytes,
466 num_items, num_segments,
467 d_begin_offsets, d_end_offsets,
468 stream, debug_synchronous
Definition: device_segmented_sort.hpp:40
Definition: util_type.hpp:108