@@ -2304,11 +2304,9 @@ template <> struct NDRangeReduction<reduction::strategy::auto_select> {
2304
2304
2305
2305
template <typename KernelName, reduction::strategy Strategy, int Dims,
2306
2306
typename PropertiesT, typename ... RestT>
2307
- void reduction_parallel_for (handler &CGH,
2308
- std::shared_ptr<detail::queue_impl> Queue,
2309
- nd_range<Dims> NDRange, PropertiesT Properties,
2310
- RestT... Rest) {
2311
- NDRangeReduction<Strategy>::template run<KernelName>(CGH, Queue, NDRange,
2307
+ void reduction_parallel_for (handler &CGH, nd_range<Dims> NDRange,
2308
+ PropertiesT Properties, RestT... Rest) {
2309
+ NDRangeReduction<Strategy>::template run<KernelName>(CGH, CGH.MQueue , NDRange,
2312
2310
Properties, Rest...);
2313
2311
}
2314
2312
@@ -2317,10 +2315,9 @@ reduGetMaxNumConcurrentWorkGroups(std::shared_ptr<queue_impl> Queue);
2317
2315
2318
2316
template <typename KernelName, reduction::strategy Strategy, int Dims,
2319
2317
typename PropertiesT, typename KernelType, typename Reduction>
2320
- void reduction_parallel_for (handler &CGH,
2321
- std::shared_ptr<detail::queue_impl> Queue,
2322
- range<Dims> Range, PropertiesT Properties,
2323
- Reduction Redu, KernelType KernelFunc) {
2318
+ void reduction_parallel_for (handler &CGH, range<Dims> Range,
2319
+ PropertiesT Properties, Reduction Redu,
2320
+ KernelType KernelFunc) {
2324
2321
// Before running the kernels, check that device has enough local memory
2325
2322
// to hold local arrays required for the tree-reduction algorithm.
2326
2323
constexpr bool IsTreeReduction =
@@ -2331,13 +2328,13 @@ void reduction_parallel_for(handler &CGH,
2331
2328
#ifdef __SYCL_REDUCTION_NUM_CONCURRENT_WORKGROUPS
2332
2329
__SYCL_REDUCTION_NUM_CONCURRENT_WORKGROUPS;
2333
2330
#else
2334
- reduGetMaxNumConcurrentWorkGroups (Queue );
2331
+ reduGetMaxNumConcurrentWorkGroups (CGH. MQueue );
2335
2332
#endif
2336
2333
2337
2334
// TODO: currently the preferred work group size is determined for the given
2338
2335
// queue/device, while it is safer to use queries to the kernel pre-compiled
2339
2336
// for the device.
2340
- size_t PrefWGSize = reduGetPreferredWGSize (Queue , OneElemSize);
2337
+ size_t PrefWGSize = reduGetPreferredWGSize (CGH. MQueue , OneElemSize);
2341
2338
2342
2339
size_t NWorkItems = Range.size ();
2343
2340
size_t WGSize = std::min (NWorkItems, PrefWGSize);
@@ -2387,8 +2384,8 @@ void reduction_parallel_for(handler &CGH,
2387
2384
return reduction::strategy::range_basic;
2388
2385
}();
2389
2386
2390
- reduction_parallel_for<KernelName, StrategyToUse>(
2391
- CGH, Queue, NDRange, Properties, Redu, UpdatedKernelFunc);
2387
+ reduction_parallel_for<KernelName, StrategyToUse>(CGH, NDRange, Properties,
2388
+ Redu, UpdatedKernelFunc);
2392
2389
}
2393
2390
} // namespace detail
2394
2391
0 commit comments