Skip to content

Commit 09fb342

Browse files
[SYCL][Reduction] Fix unused variable warning (#7345)
1 parent b90391e commit 09fb342

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sycl/include/sycl/reduction.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ struct NDRangeReduction<reduction::strategy::local_atomic_and_atomic_cross_wg> {
854854
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
855855
nd_range<Dims> NDRange, PropertiesT &Properties,
856856
Reduction &Redu, KernelType &KernelFunc) {
857+
std::ignore = Queue;
857858
size_t NElements = Reduction::num_elements;
858859
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
859860
local_accessor<typename Reduction::result_type, 1> GroupSum{NElements, CGH};
@@ -904,6 +905,7 @@ struct NDRangeReduction<
904905
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
905906
nd_range<Dims> NDRange, PropertiesT &Properties,
906907
Reduction &Redu, KernelType &KernelFunc) {
908+
std::ignore = Queue;
907909
size_t NElements = Reduction::num_elements;
908910
size_t WGSize = NDRange.get_local_range().size();
909911
size_t NWorkGroups = NDRange.get_group_range().size();
@@ -1003,6 +1005,7 @@ template <> struct NDRangeReduction<reduction::strategy::range_basic> {
10031005
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
10041006
nd_range<Dims> NDRange, PropertiesT &Properties,
10051007
Reduction &Redu, KernelType &KernelFunc) {
1008+
std::ignore = Queue;
10061009
size_t NElements = Reduction::num_elements;
10071010
size_t WGSize = NDRange.get_local_range().size();
10081011
size_t NWorkGroups = NDRange.get_group_range().size();
@@ -1121,6 +1124,7 @@ struct NDRangeReduction<reduction::strategy::group_reduce_and_atomic_cross_wg> {
11211124
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
11221125
nd_range<Dims> NDRange, PropertiesT &Properties,
11231126
Reduction &Redu, KernelType &KernelFunc) {
1127+
std::ignore = Queue;
11241128
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
11251129
size_t NElements = Reduction::num_elements;
11261130

@@ -1158,6 +1162,7 @@ struct NDRangeReduction<
11581162
static void run(handler &CGH, std::shared_ptr<detail::queue_impl> &Queue,
11591163
nd_range<Dims> NDRange, PropertiesT &Properties,
11601164
Reduction &Redu, KernelType &KernelFunc) {
1165+
std::ignore = Queue;
11611166
auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH);
11621167
size_t NElements = Reduction::num_elements;
11631168
size_t WGSize = NDRange.get_local_range().size();

0 commit comments

Comments
 (0)