30 #ifndef HIPCUB_CUB_DEVICE_DEVICE_REDUCE_HPP_
31 #define HIPCUB_CUB_DEVICE_DEVICE_REDUCE_HPP_
33 #include "../../../config.hpp"
35 #include <cub/device/device_reduce.cuh>
37 BEGIN_HIPCUB_NAMESPACE
43 typename InputIteratorT,
44 typename OutputIteratorT,
48 HIPCUB_RUNTIME_FUNCTION
static
49 hipError_t Reduce(
void *d_temp_storage,
50 size_t &temp_storage_bytes,
52 OutputIteratorT d_out,
54 ReduceOpT reduction_op,
56 hipStream_t stream = 0,
57 bool debug_synchronous =
false)
59 return hipCUDAErrorTohipError(
60 ::cub::DeviceReduce::Reduce(
61 d_temp_storage, temp_storage_bytes,
62 d_in, d_out, num_items,
64 stream, debug_synchronous
70 typename InputIteratorT,
71 typename OutputIteratorT
73 HIPCUB_RUNTIME_FUNCTION
static
74 hipError_t
Sum(
void *d_temp_storage,
75 size_t &temp_storage_bytes,
77 OutputIteratorT d_out,
79 hipStream_t stream = 0,
80 bool debug_synchronous =
false)
82 return hipCUDAErrorTohipError(
83 ::cub::DeviceReduce::Sum(
84 d_temp_storage, temp_storage_bytes,
85 d_in, d_out, num_items,
86 stream, debug_synchronous
92 typename InputIteratorT,
93 typename OutputIteratorT
95 HIPCUB_RUNTIME_FUNCTION
static
96 hipError_t
Min(
void *d_temp_storage,
97 size_t &temp_storage_bytes,
99 OutputIteratorT d_out,
101 hipStream_t stream = 0,
102 bool debug_synchronous =
false)
104 return hipCUDAErrorTohipError(
105 ::cub::DeviceReduce::Min(
106 d_temp_storage, temp_storage_bytes,
107 d_in, d_out, num_items,
108 stream, debug_synchronous
114 typename InputIteratorT,
115 typename OutputIteratorT
117 HIPCUB_RUNTIME_FUNCTION
static
118 hipError_t
ArgMin(
void *d_temp_storage,
119 size_t &temp_storage_bytes,
121 OutputIteratorT d_out,
123 hipStream_t stream = 0,
124 bool debug_synchronous =
false)
126 return hipCUDAErrorTohipError(
127 ::cub::DeviceReduce::ArgMin(
128 d_temp_storage, temp_storage_bytes,
129 d_in, d_out, num_items,
130 stream, debug_synchronous
136 typename InputIteratorT,
137 typename OutputIteratorT
139 HIPCUB_RUNTIME_FUNCTION
static
140 hipError_t
Max(
void *d_temp_storage,
141 size_t &temp_storage_bytes,
143 OutputIteratorT d_out,
145 hipStream_t stream = 0,
146 bool debug_synchronous =
false)
148 return hipCUDAErrorTohipError(
149 ::cub::DeviceReduce::Max(
150 d_temp_storage, temp_storage_bytes,
151 d_in, d_out, num_items,
152 stream, debug_synchronous
158 typename InputIteratorT,
159 typename OutputIteratorT
161 HIPCUB_RUNTIME_FUNCTION
static
162 hipError_t
ArgMax(
void *d_temp_storage,
163 size_t &temp_storage_bytes,
165 OutputIteratorT d_out,
167 hipStream_t stream = 0,
168 bool debug_synchronous =
false)
170 return hipCUDAErrorTohipError(
171 ::cub::DeviceReduce::ArgMax(
172 d_temp_storage, temp_storage_bytes,
173 d_in, d_out, num_items,
174 stream, debug_synchronous
180 typename KeysInputIteratorT,
181 typename UniqueOutputIteratorT,
182 typename ValuesInputIteratorT,
183 typename AggregatesOutputIteratorT,
184 typename NumRunsOutputIteratorT,
185 typename ReductionOpT
187 HIPCUB_RUNTIME_FUNCTION
static
188 hipError_t ReduceByKey(
void * d_temp_storage,
189 size_t& temp_storage_bytes,
190 KeysInputIteratorT d_keys_in,
191 UniqueOutputIteratorT d_unique_out,
192 ValuesInputIteratorT d_values_in,
193 AggregatesOutputIteratorT d_aggregates_out,
194 NumRunsOutputIteratorT d_num_runs_out,
195 ReductionOpT reduction_op,
197 hipStream_t stream = 0,
198 bool debug_synchronous =
false)
200 return hipCUDAErrorTohipError(
201 ::cub::DeviceReduce::ReduceByKey(
202 d_temp_storage, temp_storage_bytes,
203 d_keys_in, d_unique_out,
204 d_values_in, d_aggregates_out,
205 d_num_runs_out, reduction_op, num_items,
206 stream, debug_synchronous
Definition: device_reduce.hpp:40
Definition: thread_operators.hpp:106
Definition: thread_operators.hpp:121
Definition: thread_operators.hpp:86
Definition: thread_operators.hpp:96
Definition: thread_operators.hpp:76