Skip to content

[SYCL] [L0] Fix for unreferenced parameters. #8984

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

Merged
merged 1 commit into from
Apr 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sycl/source/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ __SYCL_INLINE_VER_NAMESPACE(_V1) {
queue::queue(const context &SyclContext, const device_selector &DeviceSelector,
const async_handler &AsyncHandler, const property_list &PropList,
Discriminator Disc) {
Copy link
Contributor

Choose a reason for hiding this comment

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

could do [[maybe_unused]] Discriminator Disc

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this parameter in the spec - https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#_queue_interface. So we added a parameter, which we ignore. Could you please clarify why do we ignore Disc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See comment in #7196.

(void)Disc;
const std::vector<device> Devs = SyclContext.get_devices();

auto Comp = [&DeviceSelector](const device &d1, const device &d2) {
Expand All @@ -41,13 +42,15 @@ queue::queue(const context &SyclContext, const device_selector &DeviceSelector,
queue::queue(const context &SyclContext, const device &SyclDevice,
const async_handler &AsyncHandler, const property_list &PropList,
Discriminator Disc) {
(void)Disc;
impl = std::make_shared<detail::queue_impl>(
detail::getSyclObjImpl(SyclDevice), detail::getSyclObjImpl(SyclContext),
AsyncHandler, PropList, false);
}

queue::queue(const device &SyclDevice, const async_handler &AsyncHandler,
const property_list &PropList, Discriminator Disc) {
(void)Disc;
impl = std::make_shared<detail::queue_impl>(
detail::getSyclObjImpl(SyclDevice), AsyncHandler, PropList, false);
}
Expand Down