llvm
llvm copied to clipboard
[SYCL][Doc] Update address_cast specification
This PR contains three improvements to the specification:
- Default address_cast to no decoration.
- Add overloads for generic multi_ptr.
- Add address_space shorthands.
This allows developers using generic raw pointers to cast to multi_ptr without worrying about decoration:
float* ptr = ...;
auto mptr = syclex::static_address_cast<syclex::local_space>(ptr);
...or to opt-in to decoration by using a generic multi-pointer, which propagates decoration information:
multi_ptr<float, syclex::generic_space, access::decorated::yes> decorated_in = ...;
auto decorated_out = syclex::static_address_cast<syclex::local_space>(decorated_in);