30 #ifndef HIPCUB_ROCPRIM_DEVICE_DEVICE_HISTOGRAM_HPP_
31 #define HIPCUB_ROCPRIM_DEVICE_DEVICE_HISTOGRAM_HPP_
33 #include "../../../config.hpp"
35 #include "../util_type.hpp"
37 #include <rocprim/device/device_histogram.hpp>
39 BEGIN_HIPCUB_NAMESPACE
41 struct DeviceHistogram
44 typename SampleIteratorT,
49 HIPCUB_RUNTIME_FUNCTION
static
50 hipError_t HistogramEven(
void * d_temp_storage,
51 size_t& temp_storage_bytes,
52 SampleIteratorT d_samples,
53 CounterT * d_histogram,
58 hipStream_t stream = 0,
59 bool debug_synchronous =
false)
61 return ::rocprim::histogram_even(
62 d_temp_storage, temp_storage_bytes,
63 d_samples, num_samples,
65 num_levels, lower_level, upper_level,
66 stream, debug_synchronous
71 typename SampleIteratorT,
76 HIPCUB_RUNTIME_FUNCTION
static
77 hipError_t HistogramEven(
void * d_temp_storage,
78 size_t& temp_storage_bytes,
79 SampleIteratorT d_samples,
80 CounterT * d_histogram,
84 OffsetT num_row_samples,
86 size_t row_stride_bytes,
87 hipStream_t stream = 0,
88 bool debug_synchronous =
false)
90 return ::rocprim::histogram_even(
91 d_temp_storage, temp_storage_bytes,
92 d_samples, num_row_samples, num_rows, row_stride_bytes,
94 num_levels, lower_level, upper_level,
95 stream, debug_synchronous
101 int NUM_ACTIVE_CHANNELS,
102 typename SampleIteratorT,
107 HIPCUB_RUNTIME_FUNCTION
static
108 hipError_t MultiHistogramEven(
void * d_temp_storage,
109 size_t& temp_storage_bytes,
110 SampleIteratorT d_samples,
111 CounterT * d_histogram[NUM_ACTIVE_CHANNELS],
112 int num_levels[NUM_ACTIVE_CHANNELS],
113 LevelT lower_level[NUM_ACTIVE_CHANNELS],
114 LevelT upper_level[NUM_ACTIVE_CHANNELS],
116 hipStream_t stream = 0,
117 bool debug_synchronous =
false)
119 unsigned int levels[NUM_ACTIVE_CHANNELS];
120 for(
unsigned int channel = 0; channel < NUM_ACTIVE_CHANNELS; channel++)
122 levels[channel] = num_levels[channel];
124 return ::rocprim::multi_histogram_even<NUM_CHANNELS, NUM_ACTIVE_CHANNELS>(
125 d_temp_storage, temp_storage_bytes,
126 d_samples, num_pixels,
128 levels, lower_level, upper_level,
129 stream, debug_synchronous
135 int NUM_ACTIVE_CHANNELS,
136 typename SampleIteratorT,
141 HIPCUB_RUNTIME_FUNCTION
static
142 hipError_t MultiHistogramEven(
void * d_temp_storage,
143 size_t& temp_storage_bytes,
144 SampleIteratorT d_samples,
145 CounterT * d_histogram[NUM_ACTIVE_CHANNELS],
146 int num_levels[NUM_ACTIVE_CHANNELS],
147 LevelT lower_level[NUM_ACTIVE_CHANNELS],
148 LevelT upper_level[NUM_ACTIVE_CHANNELS],
149 OffsetT num_row_pixels,
151 size_t row_stride_bytes,
152 hipStream_t stream = 0,
153 bool debug_synchronous =
false)
155 unsigned int levels[NUM_ACTIVE_CHANNELS];
156 for(
unsigned int channel = 0; channel < NUM_ACTIVE_CHANNELS; channel++)
158 levels[channel] = num_levels[channel];
160 return ::rocprim::multi_histogram_even<NUM_CHANNELS, NUM_ACTIVE_CHANNELS>(
161 d_temp_storage, temp_storage_bytes,
162 d_samples, num_row_pixels, num_rows, row_stride_bytes,
164 levels, lower_level, upper_level,
165 stream, debug_synchronous
170 typename SampleIteratorT,
175 HIPCUB_RUNTIME_FUNCTION
static
176 hipError_t HistogramRange(
void * d_temp_storage,
177 size_t& temp_storage_bytes,
178 SampleIteratorT d_samples,
179 CounterT * d_histogram,
183 hipStream_t stream = 0,
184 bool debug_synchronous =
false)
186 return ::rocprim::histogram_range(
187 d_temp_storage, temp_storage_bytes,
188 d_samples, num_samples,
190 num_levels, d_levels,
191 stream, debug_synchronous
196 typename SampleIteratorT,
201 HIPCUB_RUNTIME_FUNCTION
static
202 hipError_t HistogramRange(
void * d_temp_storage,
203 size_t& temp_storage_bytes,
204 SampleIteratorT d_samples,
205 CounterT * d_histogram,
208 OffsetT num_row_samples,
210 size_t row_stride_bytes,
211 hipStream_t stream = 0,
212 bool debug_synchronous =
false)
214 return ::rocprim::histogram_range(
215 d_temp_storage, temp_storage_bytes,
216 d_samples, num_row_samples, num_rows, row_stride_bytes,
218 num_levels, d_levels,
219 stream, debug_synchronous
225 int NUM_ACTIVE_CHANNELS,
226 typename SampleIteratorT,
231 HIPCUB_RUNTIME_FUNCTION
static
232 hipError_t MultiHistogramRange(
void * d_temp_storage,
233 size_t& temp_storage_bytes,
234 SampleIteratorT d_samples,
235 CounterT * d_histogram[NUM_ACTIVE_CHANNELS],
236 int num_levels[NUM_ACTIVE_CHANNELS],
237 LevelT * d_levels[NUM_ACTIVE_CHANNELS],
239 hipStream_t stream = 0,
240 bool debug_synchronous =
false)
242 unsigned int levels[NUM_ACTIVE_CHANNELS];
243 for(
unsigned int channel = 0; channel < NUM_ACTIVE_CHANNELS; channel++)
245 levels[channel] = num_levels[channel];
247 return ::rocprim::multi_histogram_range<NUM_CHANNELS, NUM_ACTIVE_CHANNELS>(
248 d_temp_storage, temp_storage_bytes,
249 d_samples, num_pixels,
252 stream, debug_synchronous
258 int NUM_ACTIVE_CHANNELS,
259 typename SampleIteratorT,
264 HIPCUB_RUNTIME_FUNCTION
static
265 hipError_t MultiHistogramRange(
void * d_temp_storage,
266 size_t& temp_storage_bytes,
267 SampleIteratorT d_samples,
268 CounterT * d_histogram[NUM_ACTIVE_CHANNELS],
269 int num_levels[NUM_ACTIVE_CHANNELS],
270 LevelT * d_levels[NUM_ACTIVE_CHANNELS],
271 OffsetT num_row_pixels,
273 size_t row_stride_bytes,
274 hipStream_t stream = 0,
275 bool debug_synchronous =
false)
277 unsigned int levels[NUM_ACTIVE_CHANNELS];
278 for(
unsigned int channel = 0; channel < NUM_ACTIVE_CHANNELS; channel++)
280 levels[channel] = num_levels[channel];
282 return ::rocprim::multi_histogram_range<NUM_CHANNELS, NUM_ACTIVE_CHANNELS>(
283 d_temp_storage, temp_storage_bytes,
284 d_samples, num_row_pixels, num_rows, row_stride_bytes,
287 stream, debug_synchronous