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 (void)debug_synchronous;
60 return hipCUDAErrorTohipError(::cub::DeviceReduce::Reduce(d_temp_storage,
71 typename InputIteratorT,
72 typename OutputIteratorT
74 HIPCUB_RUNTIME_FUNCTION
static
75 hipError_t
Sum(
void *d_temp_storage,
76 size_t &temp_storage_bytes,
78 OutputIteratorT d_out,
80 hipStream_t stream = 0,
81 bool debug_synchronous =
false)
83 (void)debug_synchronous;
84 return hipCUDAErrorTohipError(::cub::DeviceReduce::Sum(d_temp_storage,
93 typename InputIteratorT,
94 typename OutputIteratorT
96 HIPCUB_RUNTIME_FUNCTION
static
97 hipError_t
Min(
void *d_temp_storage,
98 size_t &temp_storage_bytes,
100 OutputIteratorT d_out,
102 hipStream_t stream = 0,
103 bool debug_synchronous =
false)
105 (void)debug_synchronous;
106 return hipCUDAErrorTohipError(::cub::DeviceReduce::Min(d_temp_storage,
115 typename InputIteratorT,
116 typename OutputIteratorT
118 HIPCUB_RUNTIME_FUNCTION
static
119 hipError_t
ArgMin(
void *d_temp_storage,
120 size_t &temp_storage_bytes,
122 OutputIteratorT d_out,
124 hipStream_t stream = 0,
125 bool debug_synchronous =
false)
127 (void)debug_synchronous;
128 return hipCUDAErrorTohipError(::cub::DeviceReduce::ArgMin(d_temp_storage,
137 typename InputIteratorT,
138 typename OutputIteratorT
140 HIPCUB_RUNTIME_FUNCTION
static
141 hipError_t
Max(
void *d_temp_storage,
142 size_t &temp_storage_bytes,
144 OutputIteratorT d_out,
146 hipStream_t stream = 0,
147 bool debug_synchronous =
false)
149 (void)debug_synchronous;
150 return hipCUDAErrorTohipError(::cub::DeviceReduce::Max(d_temp_storage,
159 typename InputIteratorT,
160 typename OutputIteratorT
162 HIPCUB_RUNTIME_FUNCTION
static
163 hipError_t
ArgMax(
void *d_temp_storage,
164 size_t &temp_storage_bytes,
166 OutputIteratorT d_out,
168 hipStream_t stream = 0,
169 bool debug_synchronous =
false)
171 (void)debug_synchronous;
172 return hipCUDAErrorTohipError(::cub::DeviceReduce::ArgMax(d_temp_storage,
181 typename KeysInputIteratorT,
182 typename UniqueOutputIteratorT,
183 typename ValuesInputIteratorT,
184 typename AggregatesOutputIteratorT,
185 typename NumRunsOutputIteratorT,
186 typename ReductionOpT
188 HIPCUB_RUNTIME_FUNCTION
static
189 hipError_t ReduceByKey(
void * d_temp_storage,
190 size_t& temp_storage_bytes,
191 KeysInputIteratorT d_keys_in,
192 UniqueOutputIteratorT d_unique_out,
193 ValuesInputIteratorT d_values_in,
194 AggregatesOutputIteratorT d_aggregates_out,
195 NumRunsOutputIteratorT d_num_runs_out,
196 ReductionOpT reduction_op,
198 hipStream_t stream = 0,
199 bool debug_synchronous =
false)
201 (void)debug_synchronous;
202 return hipCUDAErrorTohipError(::cub::DeviceReduce::ReduceByKey(d_temp_storage,
Definition: device_reduce.hpp:40
Definition: thread_operators.hpp:126
Definition: thread_operators.hpp:141
Definition: thread_operators.hpp:106
Definition: thread_operators.hpp:116
Definition: thread_operators.hpp:76