8000 [SYCL][NFC] Fix copy instead of move Coverity hits by sergey-semenov · Pull Request #19175 · intel/llvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[SYCL][NFC] Fix copy instead of move Coverity hits #19175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: sycl
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

8000 Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sycl/source/detail/memory_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,8 @@ void MemoryManager::memset_2d_usm(void *DstMem, queue_impl &Queue, size_t Pitch,
sycl::make_error_code(errc::invalid),
"NULL pointer argument in 2D memory memset operation.");
MemoryManager::fill_2d_usm(DstMem, Queue, Pitch, Width, Height,
{static_cast<unsigned char>(Value)}, DepEvents,
OutEvent);
{static_cast<unsigned char>(Value)},
std::move(DepEvents), OutEvent);
}

static void
Expand Down Expand Up @@ -1151,7 +1151,7 @@ getOrBuildProgramForDeviceGlobal(queue_impl &Queue,
device_image_plain DeviceImage =
PM.getDeviceImageFromBinaryImage(&Img, Context, Device);
device_image_plain BuiltImage =
PM.build(std::move(DeviceImage), {Device}, {});
PM.build(std::move(DeviceImage), {std::move(Device)}, {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine as a short-term, but ideally we shouldn't be using non-_impl objects inside source/detail.

Copy link
Contributor Author
@sergey-semenov sergey-semenov Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

return getSyclObjImpl(BuiltImage)->get_ur_program_ref();
}

Expand Down
0