diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index d9a586ac7990d..1170ec9cf2b2c 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -2402,9 +2402,9 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor : typename = std::enable_if_t<(AccessTarget_ == access::target::device)>> __SYCL2020_DEPRECATED( "accessor::get_pointer() is deprecated, please use get_multi_ptr()") - global_ptr get_pointer() const noexcept { - return global_ptr( - const_cast::type *>( + global_ptr get_pointer() const noexcept { + return global_ptr( + const_cast::type *>( getPointerAdjusted())); } @@ -2415,7 +2415,18 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor : return constant_ptr(getPointerAdjusted()); } - template + template = 0> + accessor_ptr get_multi_ptr() const noexcept { + return accessor_ptr(getPointerAdjusted()); + } + + template = 0> + __SYCL_DEPRECATED( + "accessor::get_multi_ptr() is deprecated for non-device accessors") accessor_ptr get_multi_ptr() const noexcept { return accessor_ptr(getPointerAdjusted()); } diff --git a/sycl/include/sycl/marray.hpp b/sycl/include/sycl/marray.hpp index 644bae510c2f0..bc45a45424312 100644 --- a/sycl/include/sycl/marray.hpp +++ b/sycl/include/sycl/marray.hpp @@ -313,11 +313,36 @@ template class marray { #endif #define __SYCL_UOP(UOP, OPASSIGN) \ - friend marray &operator UOP(marray &Lhs) { \ + template \ + friend std::enable_if_t< \ + !std::is_same_v::type, bool>, marray> \ + &operator UOP(marray & Lhs) { \ Lhs OPASSIGN 1; \ return Lhs; \ } \ - friend marray operator UOP(marray &Lhs, int) { \ + template \ + friend std::enable_if_t< \ + !std::is_same_v::type, bool>, marray> \ + operator UOP(marray & Lhs, int) { \ + marray Ret(Lhs); \ + Lhs OPASSIGN 1; \ + return Ret; \ + } \ + template \ + __SYCL_DEPRECATED( \ + "++ and -- operators are deprecated for marray") \ + friend std::enable_if_t< \ + std::is_same_v::type, bool>, marray> \ + &operator UOP(marray & Lhs) { \ + Lhs OPASSIGN 1; \ + return Lhs; \ + } \ + template \ + __SYCL_DEPRECATED( \ + "++ and -- operators are deprecated for marray") \ + friend std::enable_if_t< \ + std::is_same_v::type, bool>, marray> \ + operator UOP(marray & Lhs, int) { \ marray Ret(Lhs); \ Lhs OPASSIGN 1; \ return Ret; \