Skip to content

Commit 5beeb96

Browse files
[SYCL] Remove TODO/fix typos in address_cast.hpp (#15435)
The extension is aligned with core SYCL wording for `address_space_cast`, both do not expect decorated C++ pointers as operands. Long-term plans are to replace `multi_ptr` with `annotated_ptr`, so carefully crafting the wording in both SYCL core and the extension isn't a priority right now.
1 parent 91a7d46 commit 5beeb96

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

sycl/include/sycl/ext/oneapi/experimental/address_cast.hpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@ multi_ptr<ElementType, Space, access::decorated::no>
2727
static_address_cast(ElementType *Ptr) {
2828
using ret_ty = multi_ptr<ElementType, Space, access::decorated::no>;
2929
#ifdef __SYCL_DEVICE_ONLY__
30-
// TODO: Remove this restriction.
3130
static_assert(std::is_same_v<ElementType, remove_decoration_t<ElementType>>,
32-
"The extension expect undecorated raw pointers only!");
31+
"The extension expects undecorated raw pointers only!");
3332
if constexpr (Space == generic_space) {
3433
// Undecorated raw pointer is in generic AS already, no extra casts needed.
35-
// Note for future, for `OpPtrCastToGeneric`, `Pointer` must point to one of
36-
// `Storage Classes` that doesn't include `Generic`, so this will have to
37-
// remain a special case even if the restriction above is lifted.
3834
return ret_ty(Ptr);
3935
} else {
4036
auto CastPtr = sycl::detail::spirv::GenericCastToPtr<Space>(Ptr);
@@ -60,9 +56,8 @@ multi_ptr<ElementType, Space, access::decorated::no>
6056
dynamic_address_cast(ElementType *Ptr) {
6157
using ret_ty = multi_ptr<ElementType, Space, access::decorated::no>;
6258
#ifdef __SYCL_DEVICE_ONLY__
63-
// TODO: Remove this restriction.
6459
static_assert(std::is_same_v<ElementType, remove_decoration_t<ElementType>>,
65-
"The extension expect undecorated raw pointers only!");
60+
"The extension expects undecorated raw pointers only!");
6661
if constexpr (Space == generic_space) {
6762
return ret_ty(Ptr);
6863
} else {

0 commit comments

Comments
 (0)