@@ -124,7 +124,8 @@ template <typename CommandGroupFunc>
124
124
void submit (queue Q, CommandGroupFunc &&CGF,
125
125
const sycl::detail::code_location &CodeLoc =
126
126
sycl::detail::code_location::current ()) {
127
- submit (Q, empty_properties_t {}, std::forward<CommandGroupFunc>(CGF), CodeLoc);
127
+ submit (std::move (Q), empty_properties_t {},
128
+ std::forward<CommandGroupFunc>(CGF), CodeLoc);
128
129
}
129
130
130
131
template <typename CommandGroupFunc, typename PropertiesT>
@@ -139,7 +140,7 @@ template <typename CommandGroupFunc>
139
140
event submit_with_event (queue Q, CommandGroupFunc &&CGF,
140
141
const sycl::detail::code_location &CodeLoc =
141
142
sycl::detail::code_location::current ()) {
142
- return submit_with_event (Q , empty_properties_t {},
143
+ return submit_with_event (std::move (Q) , empty_properties_t {},
143
144
std::forward<CommandGroupFunc>(CGF), CodeLoc);
144
145
}
145
146
@@ -153,8 +154,8 @@ void single_task(queue Q, const KernelType &KernelObj,
153
154
const sycl::detail::code_location &CodeLoc =
154
155
sycl::detail::code_location::current ()) {
155
156
submit (
156
- Q, [&](handler &CGH) { single_task<KernelName>(CGH, KernelObj); } ,
157
- CodeLoc);
157
+ std::move (Q) ,
158
+ [&](handler &CGH) { single_task<KernelName>(CGH, KernelObj); }, CodeLoc);
158
159
}
159
160
160
161
template <typename ... ArgsT>
@@ -165,7 +166,7 @@ void single_task(handler &CGH, const kernel &KernelObj, ArgsT &&...Args) {
165
166
166
167
template <typename ... ArgsT>
167
168
void single_task (queue Q, const kernel &KernelObj, ArgsT &&...Args) {
168
- submit (Q , [&](handler &CGH) {
169
+ submit (std::move (Q) , [&](handler &CGH) {
169
170
single_task (CGH, KernelObj, std::forward<ArgsT>(Args)...);
170
171
});
171
172
}
@@ -183,7 +184,7 @@ template <typename KernelName = sycl::detail::auto_name, int Dimensions,
183
184
typename KernelType, typename ... ReductionsT>
184
185
void parallel_for (queue Q, range<Dimensions> Range, const KernelType &KernelObj,
185
186
ReductionsT &&...Reductions) {
186
- submit (Q , [&](handler &CGH) {
187
+ submit (std::move (Q) , [&](handler &CGH) {
187
188
parallel_for<KernelName>(CGH, Range, KernelObj,
188
189
std::forward<ReductionsT>(Reductions)...);
189
190
});
@@ -206,7 +207,7 @@ template <typename KernelName = sycl::detail::auto_name, int Dimensions,
206
207
typename Properties, typename KernelType, typename ... ReductionsT>
207
208
void parallel_for (queue Q, launch_config<range<Dimensions>, Properties> Config,
208
209
const KernelType &KernelObj, ReductionsT &&...Reductions) {
209
- submit (Q , [&](handler &CGH) {
210
+ submit (std::move (Q) , [&](handler &CGH) {
210
211
parallel_for<KernelName>(CGH, Config, KernelObj,
211
212
std::forward<ReductionsT>(Reductions)...);
212
213
});
@@ -222,7 +223,7 @@ void parallel_for(handler &CGH, range<Dimensions> Range,
222
223
template <int Dimensions, typename ... ArgsT>
223
224
void parallel_for (queue Q, range<Dimensions> Range, const kernel &KernelObj,
224
225
ArgsT &&...Args) {
225
- submit (Q , [&](handler &CGH) {
226
+ submit (std::move (Q) , [&](handler &CGH) {
226
227
parallel_for (CGH, Range, KernelObj, std::forward<ArgsT>(Args)...);
227
228
});
228
229
}
@@ -242,7 +243,7 @@ void parallel_for(handler &CGH,
242
243
template <int Dimensions, typename Properties, typename ... ArgsT>
243
244
void parallel_for (queue Q, launch_config<range<Dimensions>, Properties> Config,
244
245
const kernel &KernelObj, ArgsT &&...Args) {
245
- submit (Q , [&](handler &CGH) {
246
+ submit (std::move (Q) , [&](handler &CGH) {
246
247
parallel_for (CGH, Config, KernelObj, std::forward<ArgsT>(Args)...);
247
248
});
248
249
}
@@ -259,7 +260,7 @@ template <typename KernelName = sycl::detail::auto_name, int Dimensions,
259
260
typename KernelType, typename ... ReductionsT>
260
261
void nd_launch (queue Q, nd_range<Dimensions> Range, const KernelType &KernelObj,
261
262
ReductionsT &&...Reductions) {
262
- submit (Q , [&](handler &CGH) {
263
+ submit (std::move (Q) , [&](handler &CGH) {
263
264
nd_launch<KernelName>(CGH, Range, KernelObj,
264
265
std::forward<ReductionsT>(Reductions)...);
265
266
});
@@ -283,7 +284,7 @@ template <typename KernelName = sycl::detail::auto_name, int Dimensions,
283
284
typename Properties, typename KernelType, typename ... ReductionsT>
284
285
void nd_launch (queue Q, launch_config<nd_range<Dimensions>, Properties> Config,
285
286
const KernelType &KernelObj, ReductionsT &&...Reductions) {
286
- submit (Q , [&](handler &CGH) {
287
+ submit (std::move (Q) , [&](handler &CGH) {
287
288
nd_launch<KernelName>(CGH, Config, KernelObj,
288
289
std::forward<ReductionsT>(Reductions)...);
289
290
});
@@ -299,7 +300,7 @@ void nd_launch(handler &CGH, nd_range<Dimensions> Range,
299
300
template <int Dimensions, typename ... ArgsT>
300
301
void nd_launch (queue Q, nd_range<Dimensions> Range, const kernel &KernelObj,
301
302
ArgsT &&...Args) {
302
- submit (Q , [&](handler &CGH) {
303
+ submit (std::move (Q) , [&](handler &CGH) {
303
304
nd_launch (CGH, Range, KernelObj, std::forward<ArgsT>(Args)...);
304
305
});
305
306
}
@@ -319,7 +320,7 @@ void nd_launch(handler &CGH,
319
320
template <int Dimensions, typename Properties, typename ... ArgsT>
320
321
void nd_launch (queue Q, launch_config<nd_range<Dimensions>, Properties> Config,
321
322
const kernel &KernelObj, ArgsT &&...Args) {
322
- submit (Q , [&](handler &CGH) {
323
+ submit (std::move (Q) , [&](handler &CGH) {
323
324
nd_launch (CGH, Config, KernelObj, std::forward<ArgsT>(Args)...);
324
325
});
325
326
}
@@ -341,7 +342,9 @@ template <typename T>
341
342
void copy (queue Q, const T *Src, T *Dest, size_t Count,
342
343
const sycl::detail::code_location &CodeLoc =
343
344
sycl::detail::code_location::current ()) {
344
- submit (Q, [&](handler &CGH) { copy<T>(CGH, Src, Dest, Count); }, CodeLoc);
345
+ submit (
346
+ std::move (Q), [&](handler &CGH) { copy<T>(CGH, Src, Dest, Count); },
347
+ CodeLoc);
345
348
}
346
349
347
350
inline void memset (handler &CGH, void *Ptr, int Value, size_t NumBytes) {
@@ -361,7 +364,9 @@ template <typename T>
361
364
void fill (sycl::queue Q, T *Ptr, const T &Pattern, size_t Count,
362
365
const sycl::detail::code_location &CodeLoc =
363
366
sycl::detail::code_location::current ()) {
364
- submit (Q, [&](handler &CGH) { fill<T>(CGH, Ptr, Pattern, Count); }, CodeLoc);
367
+ submit (
368
+ std::move (Q), [&](handler &CGH) { fill<T>(CGH, Ptr, Pattern, Count); },
369
+ CodeLoc);
365
370
}
366
371
367
372
inline void prefetch (handler &CGH, void *Ptr, size_t NumBytes) {
@@ -371,7 +376,9 @@ inline void prefetch(handler &CGH, void *Ptr, size_t NumBytes) {
371
376
inline void prefetch (queue Q, void *Ptr, size_t NumBytes,
372
377
const sycl::detail::code_location &CodeLoc =
373
378
sycl::detail::code_location::current ()) {
374
- submit (Q, [&](handler &CGH) { prefetch (CGH, Ptr, NumBytes); }, CodeLoc);
379
+ submit (
380
+ std::move (Q), [&](handler &CGH) { prefetch (CGH, Ptr, NumBytes); },
381
+ CodeLoc);
375
382
}
376
383
377
384
inline void mem_advise (handler &CGH, void *Ptr, size_t NumBytes, int Advice) {
@@ -386,7 +393,7 @@ inline void barrier(handler &CGH) { CGH.ext_oneapi_barrier(); }
386
393
387
394
inline void barrier (queue Q, const sycl::detail::code_location &CodeLoc =
388
395
sycl::detail::code_location::current ()) {
389
- submit (Q , [&](handler &CGH) { barrier (CGH); }, CodeLoc);
396
+ submit (std::move (Q) , [&](handler &CGH) { barrier (CGH); }, CodeLoc);
390
397
}
391
398
392
399
inline void partial_barrier (handler &CGH, const std::vector<event> &Events) {
@@ -396,7 +403,9 @@ inline void partial_barrier(handler &CGH, const std::vector<event> &Events) {
396
403
inline void partial_barrier (queue Q, const std::vector<event> &Events,
397
404
const sycl::detail::code_location &CodeLoc =
398
405
sycl::detail::code_location::current ()) {
399
- submit (Q, [&](handler &CGH) { partial_barrier (CGH, Events); }, CodeLoc);
406
+ submit (
407
+ std::move (Q), [&](handler &CGH) { partial_barrier (CGH, Events); },
408
+ CodeLoc);
400
409
}
401
410
402
411
inline void execute_graph (queue Q, command_graph<graph_state::executable> &G,
0 commit comments