From 571ba3e3bda957d2a280ceece830712fcec63e11 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Wed, 9 Nov 2022 22:46:16 -0800 Subject: [PATCH] [SYCL][Reduction] Fix unused variable warning --- sycl/include/sycl/reduction.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sycl/include/sycl/reduction.hpp b/sycl/include/sycl/reduction.hpp index bc84422033fbe..af985bbdaad9a 100644 --- a/sycl/include/sycl/reduction.hpp +++ b/sycl/include/sycl/reduction.hpp @@ -854,6 +854,7 @@ struct NDRangeReduction { static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; size_t NElements = Reduction::num_elements; auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH); local_accessor GroupSum{NElements, CGH}; @@ -904,6 +905,7 @@ struct NDRangeReduction< static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; size_t NElements = Reduction::num_elements; size_t WGSize = NDRange.get_local_range().size(); size_t NWorkGroups = NDRange.get_group_range().size(); @@ -1003,6 +1005,7 @@ template <> struct NDRangeReduction { static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; size_t NElements = Reduction::num_elements; size_t WGSize = NDRange.get_local_range().size(); size_t NWorkGroups = NDRange.get_group_range().size(); @@ -1121,6 +1124,7 @@ struct NDRangeReduction { static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH); size_t NElements = Reduction::num_elements; @@ -1158,6 +1162,7 @@ struct NDRangeReduction< static void run(handler &CGH, std::shared_ptr &Queue, nd_range NDRange, PropertiesT &Properties, Reduction &Redu, KernelType &KernelFunc) { + std::ignore = Queue; auto Out = Redu.getReadWriteAccessorToInitializedMem(CGH); size_t NElements = Reduction::num_elements; size_t WGSize = NDRange.get_local_range().size();