llvm
llvm copied to clipboard
[SYCL] Change `getSyclObjImpl` to return reference to an impl
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 universalgetSyclObjImplReffor 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.