Skip to content

[NFC][SYCL] enable_shared_from_this for queue_impl #18715

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

Conversation

aelovikov-intel
Copy link
Contributor

No need to pass an ugly Self in multiple methods after this. Further simplifications enabled by this change are left for subsequent PRs.

No need to pass an ugly `Self` in multiple methods after this. Further
simplifications enabled by this change are left for subsequent PRs.
@aelovikov-intel aelovikov-intel force-pushed the queue-impl-shared-from-this branch from 0586293 to 18cebb5 Compare May 29, 2025 23:07
@aelovikov-intel aelovikov-intel marked this pull request as ready for review May 30, 2025 01:55
Copy link
Contributor

@uditagarwal97 uditagarwal97 left a comment

Choose a reason for hiding this comment

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

LGTM

@aelovikov-intel
Copy link
Contributor Author

@reble , @intel/sycl-graphs-reviewers , ping

@aelovikov-intel aelovikov-intel merged commit 732a9ce into intel:sycl May 30, 2025
35 of 37 checks passed
@aelovikov-intel aelovikov-intel deleted the queue-impl-shared-from-this branch May 30, 2025 14:59
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Jun 3, 2025
…ared`

And once that is guaranteed, inherit it from
`std::enable_shared_from_this`. Further simplifications based on
`[shared|weak]_from_this` are left to subsequent PRs.

Earlier related PRs:
intel#18715 same for `queue_impl`
intel#18227 same for `device_impl`
intel#18141 similar for `platform_impl`
aelovikov-intel added a commit that referenced this pull request Jun 4, 2025
…ared` (#18795)

And once that is guaranteed, inherit it from
`std::enable_shared_from_this`. Further simplifications based on
`[shared|weak]_from_this` are left to subsequent PRs.

Earlier related PRs:
#18715 same for `queue_impl`
#18227 same for `device_impl`
#18141 similar for `platform_impl`

Co-authored-by: andrei.elovikov <[email protected]>
aelovikov-intel added a commit that referenced this pull request Jun 9, 2025
…e_impl` (#18748)

`foo(const std::shared_ptr<queue_impl> &)` doesn't provide any
information about possible `nullptr` arguments. It could provide
information about possibility of creating a copy if used sparsely, but
when entire codebase passes all objects like this it's meaningless too.

Instead of that, the WIP refactoring across the entire codebase is to
pass by raw ptr/ref (depending on the possibility of `nullptr` value)
and extending lifetimes with explicit `shared_from_this()`.

This PR is limited to `graph_impl.hpp` interfaces accepting
`queue_impl`, clean up after #18715.
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants