21 #ifndef ROCPRIM_DEVICE_DETAIL_CONFIG_DEVICE_REDUCE_HPP_ 22 #define ROCPRIM_DEVICE_DETAIL_CONFIG_DEVICE_REDUCE_HPP_ 24 #include "../../../type_traits.hpp" 25 #include "../device_config_helper.hpp" 26 #include <type_traits> 36 BEGIN_ROCPRIM_NAMESPACE
41 template<
unsigned int arch,
class key_type,
class enable =
void>
46 template<
class key_type>
48 static_cast<unsigned int>(target_arch::gfx1030),
50 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
51 && (sizeof(key_type) > 4))>>
52 :
reduce_config<256, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
56 template<
class key_type>
58 static_cast<unsigned int>(target_arch::gfx1030),
60 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
61 && (sizeof(key_type) > 2))>>
62 :
reduce_config<256, 2, ::rocprim::block_reduce_algorithm::using_warp_reduce>
66 template<
class key_type>
69 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
70 && (sizeof(key_type) <= 2))>>
71 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
75 template<
class key_type>
77 static_cast<unsigned int>(target_arch::gfx1030),
79 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
80 && (sizeof(key_type) > 4))>>
81 :
reduce_config<256, 1, ::rocprim::block_reduce_algorithm::using_warp_reduce>
85 template<
class key_type>
87 static_cast<unsigned int>(target_arch::gfx1030),
89 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
90 && (sizeof(key_type) > 2))>>
91 :
reduce_config<256, 2, ::rocprim::block_reduce_algorithm::using_warp_reduce>
95 template<
class key_type>
97 static_cast<unsigned int>(target_arch::gfx1030),
99 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
100 && (sizeof(key_type) > 1))>>
101 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
105 template<
class key_type>
108 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
109 && (sizeof(key_type) <= 1))>>
110 :
reduce_config<128, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
114 template<
class key_type>
116 static_cast<unsigned int>(target_arch::gfx1102),
118 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
119 && (sizeof(key_type) > 4))>>
120 :
reduce_config<256, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
124 template<
class key_type>
126 static_cast<unsigned int>(target_arch::gfx1102),
128 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
129 && (sizeof(key_type) > 2))>>
130 :
reduce_config<128, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
134 template<
class key_type>
137 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
138 && (sizeof(key_type) <= 2))>>
139 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
143 template<
class key_type>
145 static_cast<unsigned int>(target_arch::gfx1102),
147 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
148 && (sizeof(key_type) > 4))>>
149 :
reduce_config<128, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
153 template<
class key_type>
155 static_cast<unsigned int>(target_arch::gfx1102),
157 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
158 && (sizeof(key_type) > 2))>>
159 :
reduce_config<256, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
163 template<
class key_type>
165 static_cast<unsigned int>(target_arch::gfx1102),
167 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
168 && (sizeof(key_type) > 1))>>
169 :
reduce_config<256, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
173 template<
class key_type>
176 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
177 && (sizeof(key_type) <= 1))>>
178 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
182 template<
class key_type>
184 static_cast<unsigned int>(target_arch::gfx900),
186 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
187 && (sizeof(key_type) > 4))>>
188 :
reduce_config<128, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
192 template<
class key_type>
194 static_cast<unsigned int>(target_arch::gfx900),
196 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
197 && (sizeof(key_type) > 2))>>
198 :
reduce_config<128, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
202 template<
class key_type>
205 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
206 && (sizeof(key_type) <= 2))>>
207 :
reduce_config<128, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
211 template<
class key_type>
213 static_cast<unsigned int>(target_arch::gfx900),
215 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
216 && (sizeof(key_type) > 4))>>
217 :
reduce_config<128, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
221 template<
class key_type>
223 static_cast<unsigned int>(target_arch::gfx900),
225 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
226 && (sizeof(key_type) > 2))>>
227 :
reduce_config<128, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
231 template<
class key_type>
233 static_cast<unsigned int>(target_arch::gfx900),
235 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
236 && (sizeof(key_type) > 1))>>
237 :
reduce_config<128, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
241 template<
class key_type>
244 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
245 && (sizeof(key_type) <= 1))>>
246 :
reduce_config<64, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
250 template<
class key_type>
252 static_cast<unsigned int>(target_arch::gfx906),
254 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
255 && (sizeof(key_type) > 4))>>
256 :
reduce_config<128, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
260 template<
class key_type>
262 static_cast<unsigned int>(target_arch::gfx906),
264 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
265 && (sizeof(key_type) > 2))>>
266 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
270 template<
class key_type>
273 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
274 && (sizeof(key_type) <= 2))>>
275 :
reduce_config<64, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
279 template<
class key_type>
281 static_cast<unsigned int>(target_arch::gfx906),
283 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
284 && (sizeof(key_type) > 4))>>
285 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
289 template<
class key_type>
291 static_cast<unsigned int>(target_arch::gfx906),
293 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
294 && (sizeof(key_type) > 2))>>
295 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
299 template<
class key_type>
301 static_cast<unsigned int>(target_arch::gfx906),
303 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
304 && (sizeof(key_type) > 1))>>
305 :
reduce_config<256, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
309 template<
class key_type>
312 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
313 && (sizeof(key_type) <= 1))>>
314 :
reduce_config<128, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
318 template<
class key_type>
320 static_cast<unsigned int>(target_arch::gfx908),
322 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
323 && (sizeof(key_type) > 4))>>
324 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
328 template<
class key_type>
330 static_cast<unsigned int>(target_arch::gfx908),
332 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
333 && (sizeof(key_type) > 2))>>
334 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
338 template<
class key_type>
341 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
342 && (sizeof(key_type) <= 2))>>
343 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
347 template<
class key_type>
349 static_cast<unsigned int>(target_arch::gfx908),
351 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
352 && (sizeof(key_type) > 4))>>
353 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
357 template<
class key_type>
359 static_cast<unsigned int>(target_arch::gfx908),
361 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
362 && (sizeof(key_type) > 2))>>
363 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
367 template<
class key_type>
369 static_cast<unsigned int>(target_arch::gfx908),
371 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
372 && (sizeof(key_type) > 1))>>
373 :
reduce_config<128, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
377 template<
class key_type>
380 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
381 && (sizeof(key_type) <= 1))>>
382 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
386 template<
class key_type>
388 static_cast<unsigned int>(target_arch::unknown),
390 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
391 && (sizeof(key_type) > 4))>>
392 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
396 template<
class key_type>
398 static_cast<unsigned int>(target_arch::unknown),
400 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
401 && (sizeof(key_type) > 2))>>
402 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
406 template<
class key_type>
409 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
410 && (sizeof(key_type) <= 2))>>
411 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
415 template<
class key_type>
417 static_cast<unsigned int>(target_arch::unknown),
419 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
420 && (sizeof(key_type) > 4))>>
421 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
425 template<
class key_type>
427 static_cast<unsigned int>(target_arch::unknown),
429 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
430 && (sizeof(key_type) > 2))>>
431 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
435 template<
class key_type>
437 static_cast<unsigned int>(target_arch::unknown),
439 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
440 && (sizeof(key_type) > 1))>>
441 :
reduce_config<128, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
445 template<
class key_type>
448 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
449 && (sizeof(key_type) <= 1))>>
450 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
454 template<
class key_type>
456 static_cast<unsigned int>(target_arch::gfx90a),
458 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
459 && (sizeof(key_type) > 4))>>
460 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
464 template<
class key_type>
466 static_cast<unsigned int>(target_arch::gfx90a),
468 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
469 && (sizeof(key_type) > 2))>>
470 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
474 template<
class key_type>
477 std::enable_if_t<(bool(rocprim::is_floating_point<key_type>::value)
478 && (sizeof(key_type) <= 2))>>
479 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
483 template<
class key_type>
485 static_cast<unsigned int>(target_arch::gfx90a),
487 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 8)
488 && (sizeof(key_type) > 4))>>
489 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
493 template<
class key_type>
495 static_cast<unsigned int>(target_arch::gfx90a),
497 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 4)
498 && (sizeof(key_type) > 2))>>
499 :
reduce_config<256, 4, ::rocprim::block_reduce_algorithm::using_warp_reduce>
503 template<
class key_type>
505 static_cast<unsigned int>(target_arch::gfx90a),
507 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value) && (sizeof(key_type) <= 2)
508 && (sizeof(key_type) > 1))>>
509 :
reduce_config<128, 8, ::rocprim::block_reduce_algorithm::using_warp_reduce>
513 template<
class key_type>
516 std::enable_if_t<(!bool(rocprim::is_floating_point<key_type>::value)
517 && (sizeof(key_type) <= 1))>>
518 :
reduce_config<256, 16, ::rocprim::block_reduce_algorithm::using_warp_reduce>
523 END_ROCPRIM_NAMESPACE
528 #endif // ROCPRIM_DEVICE_DETAIL_CONFIG_DEVICE_REDUCE_HPP_ Configuration of device-level reduce primitives.
Definition: device_config_helper.hpp:241
Definition: device_config_helper.hpp:265
Deprecated: Configuration of device-level scan primitives.
Definition: block_histogram.hpp:62
Definition: device_reduce.hpp:42