Skip to content

[NFC][SYCL][Graph] Update some maps to use raw node_impl * #19334

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

Conversation

aelovikov-intel
Copy link
Contributor

Continuation of the refactoring in

#19295
#19332

Part of refactoring to get rid of most (all?) `std::weak_ptr<node_impl>`
and some of `std::shared_ptr<node_impl>` started in
intel#19295. Use `nodes_range` from that PR
to implement `successors`/`predecessors` views and update read-only
accesses to the successors/predecessors to go through them.

I'm not changing the data members `MSuccessors`/`MPredecessors` yet
because it would affect unittests. I'd prefer to refactor most of the
code in future PRs before making that change and updating unittests in
one go.

I'm updating some APIs to accept `node_impl &` instead of
`std::shared_ptr` where the change is mostly localized to the callers
iterating over successors/predecessors and doesn't spoil into other code
too much. For those that weren't updated here we (temporarily) use
`shared_from_this()` but I expect to eliminate those unnecessary copies
when those interfaces will be updated in the subsequent PRs.
@aelovikov-intel
Copy link
Contributor Author

Please ignore first commit during review, this is based on top of #19332 that hasn't been merged in yet.

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.

2 participants