@@ -3059,14 +3059,15 @@ ur_result_t ExecCGCommand::enqueueImpCommandBuffer() {
30593059 " Can't get memory object due to no allocation available " +
30603060 codeToString (UR_RESULT_ERROR_INVALID_MEM_OBJECT));
30613061 };
3062- std::for_each (std::begin (HandlerReq), std::end (HandlerReq), ReqToMemConv);
3062+ std::for_each (std::begin (HandlerReq), std::end (HandlerReq),
3063+ std::move (ReqToMemConv));
30633064
30643065 ur_exp_command_buffer_handle_t InteropCommandBuffer =
30653066 ChildCommandBuffer ? ChildCommandBuffer : MCommandBuffer;
3066- interop_handle IH{ReqToMem, MQueue, DeviceImpl, ContextImpl,
3067+ interop_handle IH{std::move ( ReqToMem) , MQueue, DeviceImpl, ContextImpl,
30673068 InteropCommandBuffer};
30683069 CommandBufferNativeCommandData CustomOpData{
3069- IH , HostTask->MHostTask ->MInteropTask };
3070+ std::move (IH) , HostTask->MHostTask ->MInteropTask };
30703071
30713072#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
30723073 // CMPLRLLVM-66082
@@ -3397,7 +3398,8 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
33973398 " Can't get memory object due to no allocation available " +
33983399 codeToString (UR_RESULT_ERROR_INVALID_MEM_OBJECT));
33993400 };
3400- std::for_each (std::begin (HandlerReq), std::end (HandlerReq), ReqToMemConv);
3401+ std::for_each (std::begin (HandlerReq), std::end (HandlerReq),
3402+ std::move (ReqToMemConv));
34013403 std::sort (std::begin (ReqToMem), std::end (ReqToMem));
34023404 }
34033405
@@ -3462,12 +3464,13 @@ ur_result_t ExecCGCommand::enqueueImpQueue() {
34623464 " Can't get memory object due to no allocation available " +
34633465 codeToString (UR_RESULT_ERROR_INVALID_MEM_OBJECT));
34643466 };
3465- std::for_each (std::begin (HandlerReq), std::end (HandlerReq), ReqToMemConv);
3467+ std::for_each (std::begin (HandlerReq), std::end (HandlerReq),
3468+ std::move (ReqToMemConv));
34663469 std::sort (std::begin (ReqToMem), std::end (ReqToMem));
34673470 }
34683471
34693472 EnqueueNativeCommandData CustomOpData{
3470- interop_handle{ReqToMem, HostTask->MQueue ,
3473+ interop_handle{std::move ( ReqToMem) , HostTask->MQueue ,
34713474 HostTask->MQueue ->getDeviceImplPtr (),
34723475 HostTask->MQueue ->getContextImplPtr ()},
34733476 HostTask->MHostTask ->MInteropTask };
0 commit comments