llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Change `getSyclObjImpl` to return reference to an impl

Open aelovikov-intel opened this issue 1 month ago • 0 comments

For use cases where the underlying std::shared_ptr is really needed, add new getSyclObjImplPtr.

Motivation:

  • I want to change device/platform to use raw pointers instead of std::shared_ptr, so old semantics would even make sense for them. I could, of course, to add universal getSyclObjImplRef for the new semantics and keep the old name for the smart pointer, but I think a more universal APIs should have a shorter name.
  • Align with what Kseniya is doing in upstream work.
  • The current name is confusing, it doesn't return an actual impl, but a shared pointer to it.
  • Less easy ways to get a smart pointer means less shared pointers in the internal APIs, which is good.

aelovikov-intel avatar Dec 03 '25 15:12 aelovikov-intel