Skip to content

[SYCL] Remove deprecation of legacy multi_ptr #15893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions sycl/include/sycl/access/access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ enum class address_space : int {
generic_space = 6, // TODO generic_space address space is not supported yet
};

enum class decorated : int {
no = 0,
yes = 1,
legacy __SYCL2020_DEPRECATED("sycl::access::decorated::legacy "
"is deprecated since SYCL 2020") = 2
};
enum class decorated : int { no = 0, yes = 1, legacy = 2 };
} // namespace access

using access::target;
Expand Down
15 changes: 3 additions & 12 deletions sycl/include/sycl/multi_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,8 @@ inline constexpr auto decoration_space = Space;
} // namespace detail

// Legacy specialization of multi_ptr.
// TODO: Add deprecation warning here when possible.
template <typename ElementType, access::address_space Space>
class __SYCL2020_DEPRECATED(
"decorated::legacy multi_ptr specialization is deprecated since SYCL 2020.")
multi_ptr<ElementType, Space, access::decorated::legacy> {
class multi_ptr<ElementType, Space, access::decorated::legacy> {
static constexpr auto DecorationSpace = detail::decoration_space<Space>;

public:
Expand Down Expand Up @@ -1101,11 +1098,8 @@ class __SYCL2020_DEPRECATED(
};

// Legacy specialization of multi_ptr for void.
// TODO: Add deprecation warning here when possible.
template <access::address_space Space>
class __SYCL2020_DEPRECATED(
"decorated::legacy multi_ptr specialization is deprecated since SYCL 2020.")
multi_ptr<void, Space, access::decorated::legacy> {
class multi_ptr<void, Space, access::decorated::legacy> {
static constexpr auto DecorationSpace = detail::decoration_space<Space>;

public:
Expand Down Expand Up @@ -1264,11 +1258,8 @@ class __SYCL2020_DEPRECATED(
};

// Legacy specialization of multi_ptr for const void.
// TODO: Add deprecation warning here when possible.
template <access::address_space Space>
class __SYCL2020_DEPRECATED(
"decorated::legacy multi_ptr specialization is deprecated since SYCL 2020.")
multi_ptr<const void, Space, access::decorated::legacy> {
class multi_ptr<const void, Space, access::decorated::legacy> {
static constexpr auto DecorationSpace = detail::decoration_space<Space>;

public:
Expand Down
8 changes: 1 addition & 7 deletions sycl/test/warnings/sycl_2020_deprecations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ int main() {
[=](sycl::nd_item<1> Idx) {
int PrivateVal = 0;

// expected-warning@+6{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
// expected-warning@+8{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
// expected-warning@+8{{'get_pointer' is deprecated: accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
// expected-warning@+7{{'get_pointer<sycl::access::target::global_buffer, void>' is deprecated: accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::global_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
Expand All @@ -298,8 +296,6 @@ int main() {
sycl::make_ptr<int, sycl::access::address_space::global_space,
sycl::access::decorated::legacy>(
GlobalAcc.get_pointer());
// expected-warning@+5{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
// expected-warning@+7{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
// expected-warning@+7{{'get_pointer' is deprecated: local_accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::local_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
sycl::multi_ptr<int, sycl::access::address_space::local_space,
Expand All @@ -309,9 +305,7 @@ int main() {
sycl::access::decorated::legacy>(
LocalAcc.get_pointer());

// expected-warning@+4{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
// expected-warning@+5{{'make_ptr<int, sycl::access::address_space::private_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
// expected-warning@+6{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
// expected-warning@+4{{'make_ptr<int, sycl::access::address_space::private_space, sycl::access::decorated::legacy, void>' is deprecated: make_ptr is deprecated since SYCL 2020. Please use address_space_cast instead.}}
sycl::multi_ptr<int, sycl::access::address_space::private_space,
sycl::access::decorated::legacy>
LegacyPrivateMptr =
Expand Down
Loading