@@ -1238,15 +1238,12 @@ template <>
1238
1238
struct NDRangeReduction <reduction::strategy::local_atomic_and_atomic_cross_wg> {
1239
1239
template <typename KernelName, int Dims, typename PropertiesT,
1240
1240
typename KernelType, typename Reduction>
1241
- static void run (handler &CGH,
1242
- const std::shared_ptr<detail::queue_impl> &Queue,
1243
- nd_range<Dims> NDRange, PropertiesT &Properties,
1241
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1244
1242
Reduction &Redu, KernelType &KernelFunc) {
1245
1243
static_assert (Reduction::has_identity,
1246
1244
" Identityless reductions are not supported by the "
1247
1245
" local_atomic_and_atomic_cross_wg strategy." );
1248
1246
1249
- std::ignore = Queue;
1250
1247
using Name = __sycl_reduction_kernel<
1251
1248
reduction::MainKrn, KernelName,
1252
1249
reduction::strategy::local_atomic_and_atomic_cross_wg>;
@@ -1290,15 +1287,12 @@ struct NDRangeReduction<
1290
1287
reduction::strategy::group_reduce_and_last_wg_detection> {
1291
1288
template <typename KernelName, int Dims, typename PropertiesT,
1292
1289
typename KernelType, typename Reduction>
1293
- static void run (handler &CGH,
1294
- const std::shared_ptr<detail::queue_impl> &Queue,
1295
- nd_range<Dims> NDRange, PropertiesT &Properties,
1290
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1296
1291
Reduction &Redu, KernelType &KernelFunc) {
1297
1292
static_assert (Reduction::has_identity,
1298
1293
" Identityless reductions are not supported by the "
1299
1294
" group_reduce_and_last_wg_detection strategy." );
1300
1295
1301
- std::ignore = Queue;
1302
1296
size_t NElements = Reduction::num_elements;
1303
1297
size_t WGSize = NDRange.get_local_range ().size ();
1304
1298
size_t NWorkGroups = NDRange.get_group_range ().size ();
@@ -1490,9 +1484,7 @@ void doTreeReductionOnTuple(size_t WorkSize, size_t LID,
1490
1484
template <> struct NDRangeReduction <reduction::strategy::range_basic> {
1491
1485
template <typename KernelName, int Dims, typename PropertiesT,
1492
1486
typename KernelType, typename Reduction>
1493
- static void run (handler &CGH,
1494
- const std::shared_ptr<detail::queue_impl> &Queue,
1495
- nd_range<Dims> NDRange, PropertiesT &Properties,
1487
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1496
1488
Reduction &Redu, KernelType &KernelFunc) {
1497
1489
using reducer_type = typename Reduction::reducer_type;
1498
1490
using element_type = typename ReducerTraits<reducer_type>::element_type;
@@ -1504,7 +1496,6 @@ template <> struct NDRangeReduction<reduction::strategy::range_basic> {
1504
1496
constexpr bool UsePartialSumForOutput =
1505
1497
!Reduction::is_usm && Reduction::has_identity;
1506
1498
1507
- std::ignore = Queue;
1508
1499
size_t NElements = Reduction::num_elements;
1509
1500
size_t WGSize = NDRange.get_local_range ().size ();
1510
1501
size_t NWorkGroups = NDRange.get_group_range ().size ();
@@ -1602,15 +1593,12 @@ template <>
1602
1593
struct NDRangeReduction <reduction::strategy::group_reduce_and_atomic_cross_wg> {
1603
1594
template <typename KernelName, int Dims, typename PropertiesT,
1604
1595
typename KernelType, typename Reduction>
1605
- static void run (handler &CGH,
1606
- const std::shared_ptr<detail::queue_impl> &Queue,
1607
- nd_range<Dims> NDRange, PropertiesT &Properties,
1596
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1608
1597
Reduction &Redu, KernelType &KernelFunc) {
1609
1598
static_assert (Reduction::has_identity,
1610
1599
" Identityless reductions are not supported by the "
1611
1600
" group_reduce_and_atomic_cross_wg strategy." );
1612
1601
1613
- std::ignore = Queue;
1614
1602
using Name = __sycl_reduction_kernel<
1615
1603
reduction::MainKrn, KernelName,
1616
1604
reduction::strategy::group_reduce_and_atomic_cross_wg>;
@@ -1639,14 +1627,11 @@ struct NDRangeReduction<
1639
1627
reduction::strategy::local_mem_tree_and_atomic_cross_wg> {
1640
1628
template <typename KernelName, int Dims, typename PropertiesT,
1641
1629
typename KernelType, typename Reduction>
1642
- static void run (handler &CGH,
1643
- const std::shared_ptr<detail::queue_impl> &Queue,
1644
- nd_range<Dims> NDRange, PropertiesT &Properties,
1630
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1645
1631
Reduction &Redu, KernelType &KernelFunc) {
1646
1632
using reducer_type = typename Reduction::reducer_type;
1647
1633
using element_type = typename ReducerTraits<reducer_type>::element_type;
1648
1634
1649
- std::ignore = Queue;
1650
1635
using Name = __sycl_reduction_kernel<
1651
1636
reduction::MainKrn, KernelName,
1652
1637
reduction::strategy::local_mem_tree_and_atomic_cross_wg>;
@@ -1701,8 +1686,7 @@ struct NDRangeReduction<
1701
1686
reduction::strategy::group_reduce_and_multiple_kernels> {
1702
1687
template <typename KernelName, int Dims, typename PropertiesT,
1703
1688
typename KernelType, typename Reduction>
1704
- static void run (handler &CGH, const std::shared_ptr<detail::queue_impl> &,
1705
- nd_range<Dims> NDRange, PropertiesT &Properties,
1689
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1706
1690
Reduction &Redu, KernelType &KernelFunc) {
1707
1691
static_assert (Reduction::has_identity,
1708
1692
" Identityless reductions are not supported by the "
@@ -1839,8 +1823,7 @@ struct NDRangeReduction<
1839
1823
template <> struct NDRangeReduction <reduction::strategy::basic> {
1840
1824
template <typename KernelName, int Dims, typename PropertiesT,
1841
1825
typename KernelType, typename Reduction>
1842
- static void run (handler &CGH, const std::shared_ptr<detail::queue_impl> &,
1843
- nd_range<Dims> NDRange, PropertiesT &Properties,
1826
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
1844
1827
Reduction &Redu, KernelType &KernelFunc) {
1845
1828
using element_type = typename Reduction::reducer_element_type;
1846
1829
@@ -2614,8 +2597,7 @@ tuple_select_elements(TupleT Tuple, std::index_sequence<Is...>) {
2614
2597
template <> struct NDRangeReduction <reduction::strategy::multi> {
2615
2598
template <typename KernelName, int Dims, typename PropertiesT,
2616
2599
typename ... RestT>
2617
- static void run (handler &CGH, const std::shared_ptr<detail::queue_impl> &,
2618
- nd_range<Dims> NDRange, PropertiesT &Properties,
2600
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
2619
2601
RestT... Rest) {
2620
2602
std::tuple<RestT...> ArgsTuple (Rest...);
2621
2603
constexpr size_t NumArgs = sizeof ...(RestT);
@@ -2658,13 +2640,10 @@ template <> struct NDRangeReduction<reduction::strategy::auto_select> {
2658
2640
2659
2641
template <typename KernelName, int Dims, typename PropertiesT,
2660
2642
typename KernelType, typename Reduction>
2661
- static void run (handler &CGH,
2662
- const std::shared_ptr<detail::queue_impl> &Queue,
2663
- nd_range<Dims> NDRange, PropertiesT &Properties,
2643
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
2664
2644
Reduction &Redu, KernelType &KernelFunc) {
2665
2645
auto Delegate = [&](auto Impl) {
2666
- Impl.template run <KernelName>(CGH, Queue, NDRange, Properties, Redu,
2667
- KernelFunc);
2646
+ Impl.template run <KernelName>(CGH, NDRange, Properties, Redu, KernelFunc);
2668
2647
};
2669
2648
2670
2649
if constexpr (Reduction::has_float64_atomics) {
@@ -2706,10 +2685,9 @@ template <> struct NDRangeReduction<reduction::strategy::auto_select> {
2706
2685
}
2707
2686
template <typename KernelName, int Dims, typename PropertiesT,
2708
2687
typename ... RestT>
2709
- static void
2710
- run (handler &CGH, const std::shared_ptr<detail::queue_impl> &Queue,
2711
- nd_range<Dims> NDRange, PropertiesT &Properties, RestT... Rest) {
2712
- return Impl<Strat::multi>::run<KernelName>(CGH, Queue, NDRange, Properties,
2688
+ static void run (handler &CGH, nd_range<Dims> NDRange, PropertiesT &Properties,
2689
+ RestT... Rest) {
2690
+ return Impl<Strat::multi>::run<KernelName>(CGH, NDRange, Properties,
2713
2691
Rest...);
2714
2692
}
2715
2693
};
@@ -2718,8 +2696,8 @@ template <typename KernelName, reduction::strategy Strategy, int Dims,
2718
2696
typename PropertiesT, typename ... RestT>
2719
2697
void reduction_parallel_for (handler &CGH, nd_range<Dims> NDRange,
2720
2698
PropertiesT Properties, RestT... Rest) {
2721
- NDRangeReduction<Strategy>::template run<KernelName>(CGH, CGH. MQueue , NDRange ,
2722
- Properties, Rest...);
2699
+ NDRangeReduction<Strategy>::template run<KernelName>(CGH, NDRange, Properties ,
2700
+ Rest...);
2723
2701
}
2724
2702
2725
2703
__SYCL_EXPORT uint32_t reduGetMaxNumConcurrentWorkGroups (handler &cgh);
0 commit comments