Skip to content

Commit 73f199e

Browse files
[SYCL] Remove deprecation of legacy multi_ptr (#15893)
With KhronosGroup/SYCL-Docs#604 the SYCL specification no longer deprecates legacy multi_ptr. This commit removes the corresponding deprecation warnings from the implementation of the specializations and the enum value. --------- Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
1 parent 82d874f commit 73f199e

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

sycl/include/sycl/access/access.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,7 @@ enum class address_space : int {
6060
generic_space = 6, // TODO generic_space address space is not supported yet
6161
};
6262

63-
enum class decorated : int {
64-
no = 0,
65-
yes = 1,
66-
legacy __SYCL2020_DEPRECATED("sycl::access::decorated::legacy "
67-
"is deprecated since SYCL 2020") = 2
68-
};
63+
enum class decorated : int { no = 0, yes = 1, legacy = 2 };
6964
} // namespace access
7065

7166
using access::target;

sycl/include/sycl/multi_ptr.hpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -747,11 +747,8 @@ inline constexpr auto decoration_space = Space;
747747
} // namespace detail
748748

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

757754
public:
@@ -1101,11 +1098,8 @@ class __SYCL2020_DEPRECATED(
11011098
};
11021099

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

11111105
public:
@@ -1264,11 +1258,8 @@ class __SYCL2020_DEPRECATED(
12641258
};
12651259

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

12741265
public:

sycl/test/warnings/sycl_2020_deprecations.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,6 @@ int main() {
287287
[=](sycl::nd_item<1> Idx) {
288288
int PrivateVal = 0;
289289

290-
// expected-warning@+6{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
291-
// expected-warning@+8{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
292290
// expected-warning@+8{{'get_pointer' is deprecated: accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
293291
// expected-warning@+7{{'get_pointer<sycl::access::target::global_buffer, void>' is deprecated: accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
294292
// 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.}}
@@ -298,8 +296,6 @@ int main() {
298296
sycl::make_ptr<int, sycl::access::address_space::global_space,
299297
sycl::access::decorated::legacy>(
300298
GlobalAcc.get_pointer());
301-
// expected-warning@+5{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
302-
// expected-warning@+7{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
303299
// expected-warning@+7{{'get_pointer' is deprecated: local_accessor::get_pointer() is deprecated, please use get_multi_ptr()}}
304300
// 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.}}
305301
sycl::multi_ptr<int, sycl::access::address_space::local_space,
@@ -309,9 +305,7 @@ int main() {
309305
sycl::access::decorated::legacy>(
310306
LocalAcc.get_pointer());
311307

312-
// expected-warning@+4{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
313-
// 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.}}
314-
// expected-warning@+6{{'legacy' is deprecated: sycl::access::decorated::legacy is deprecated since SYCL 2020}}
308+
// 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.}}
315309
sycl::multi_ptr<int, sycl::access::address_space::private_space,
316310
sycl::access::decorated::legacy>
317311
LegacyPrivateMptr =

0 commit comments

Comments
 (0)