40 #include "dispatch/dispatch_reduce.cuh"
41 #include "dispatch/dispatch_reduce_by_key.cuh"
42 #include "../util_type.cuh"
43 #include "../util_namespace.cuh"
125 typename InputIteratorT,
126 typename OutputIteratorT,
127 typename ReductionOp,
131 void *d_temp_storage,
132 size_t &temp_storage_bytes,
134 OutputIteratorT d_out,
136 int *d_begin_offsets,
138 ReductionOp reduction_op,
140 cudaStream_t stream = 0,
141 bool debug_synchronous =
false)
146 return DispatchSegmentedReduce<InputIteratorT, OutputIteratorT, OffsetT, ReductionOp>::Dispatch(
207 typename InputIteratorT,
208 typename OutputIteratorT>
211 void *d_temp_storage,
212 size_t &temp_storage_bytes,
214 OutputIteratorT d_out,
216 int *d_begin_offsets,
218 cudaStream_t stream = 0,
219 bool debug_synchronous =
false)
222 typedef typename std::iterator_traits<InputIteratorT>::value_type T;
224 return DispatchSegmentedReduce<InputIteratorT, OutputIteratorT, OffsetT, cub::Sum>::Dispatch(
285 typename InputIteratorT,
286 typename OutputIteratorT>
289 void *d_temp_storage,
290 size_t &temp_storage_bytes,
292 OutputIteratorT d_out,
294 int *d_begin_offsets,
296 cudaStream_t stream = 0,
297 bool debug_synchronous =
false)
300 typedef typename std::iterator_traits<InputIteratorT>::value_type T;
302 return DispatchSegmentedReduce<InputIteratorT, OutputIteratorT, OffsetT, cub::Min>::Dispatch(
365 typename InputIteratorT,
366 typename OutputIteratorT>
369 void *d_temp_storage,
370 size_t &temp_storage_bytes,
372 OutputIteratorT d_out,
374 int *d_begin_offsets,
376 cudaStream_t stream = 0,
377 bool debug_synchronous =
false)
380 typedef typename std::iterator_traits<InputIteratorT>::value_type T;
383 ArgIndexInputIteratorT d_argmin_in(d_in);
384 KeyValuePair<OffsetT, T> init = {1, Traits<T>::Max()};
386 return DispatchSegmentedReduce<ArgIndexInputIteratorT, OutputIteratorT, OffsetT, cub::ArgMin>::Dispatch(
447 typename InputIteratorT,
448 typename OutputIteratorT>
451 void *d_temp_storage,
452 size_t &temp_storage_bytes,
454 OutputIteratorT d_out,
456 int *d_begin_offsets,
458 cudaStream_t stream = 0,
459 bool debug_synchronous =
false)
462 typedef typename std::iterator_traits<InputIteratorT>::value_type T;
464 return DispatchSegmentedReduce<InputIteratorT, OutputIteratorT, OffsetT, cub::Max>::Dispatch(
527 typename InputIteratorT,
528 typename OutputIteratorT>
531 void *d_temp_storage,
532 size_t &temp_storage_bytes,
534 OutputIteratorT d_out,
536 int *d_begin_offsets,
538 cudaStream_t stream = 0,
539 bool debug_synchronous =
false)
542 typedef typename std::iterator_traits<InputIteratorT>::value_type T;
545 ArgIndexInputIteratorT d_argmax_in(d_in);
546 KeyValuePair<OffsetT, T> init = {1, Traits<T>::Lowest()};
548 return DispatchSegmentedReduce<ArgIndexInputIteratorT, OutputIteratorT, OffsetT, cub::ArgMax>::Dispatch(