Skip to content

Commit 90d5156

Browse files
committed
[SYCL] Reintroduce __SYCL_DEPRECATED macro
__SYCL_EXPORT_DEPRECATED() should not apply to header-only functions. Signed-off-by: John Pennycook <[email protected]>
1 parent b1b18ad commit 90d5156

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

sycl/include/CL/sycl/detail/defines.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@
4646
#warning "No assumptions will be emitted due to no __builtin_assume available"
4747
#endif
4848
#endif
49+
50+
#ifdef _WIN32
51+
#define __SYCL_DEPRECATED(message) __declspec(deprecated(message))
52+
#else
53+
#define __SYCL_DEPRECATED(message) __attribute__((deprecated(message)))
54+
#endif

sycl/include/CL/sycl/intel/sub_group.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ struct sub_group {
250250
/* indices in [0 , 2 * sub_group size) */
251251

252252
template <typename T>
253-
__SYCL_EXPORT_DEPRECATED("Two-input sub-group shuffles are deprecated.")
253+
__SYCL_DEPRECATED("Two-input sub-group shuffles are deprecated.")
254254
T shuffle(T x, T y, id_type local_id) const {
255255
#ifdef __SYCL_DEVICE_ONLY__
256256
return sycl::detail::sub_group::shuffle_down(
@@ -265,7 +265,7 @@ struct sub_group {
265265
}
266266

267267
template <typename T>
268-
__SYCL_EXPORT_DEPRECATED("Two-input sub-group shuffles are deprecated.")
268+
__SYCL_DEPRECATED("Two-input sub-group shuffles are deprecated.")
269269
T shuffle_down(T current, T next, uint32_t delta) const {
270270
#ifdef __SYCL_DEVICE_ONLY__
271271
return sycl::detail::sub_group::shuffle_down(current, next, delta);
@@ -279,7 +279,7 @@ struct sub_group {
279279
}
280280

281281
template <typename T>
282-
__SYCL_EXPORT_DEPRECATED("Two-input sub-group shuffles are deprecated.")
282+
__SYCL_DEPRECATED("Two-input sub-group shuffles are deprecated.")
283283
T shuffle_up(T previous, T current, uint32_t delta) const {
284284
#ifdef __SYCL_DEVICE_ONLY__
285285
return sycl::detail::sub_group::shuffle_up(previous, current, delta);
@@ -458,9 +458,8 @@ struct sub_group {
458458
#endif
459459
}
460460

461-
__SYCL_EXPORT_DEPRECATED(
462-
"Sub-group barrier accepting fence_space is deprecated."
463-
"Use barrier() without a fence_space instead.")
461+
__SYCL_DEPRECATED("Sub-group barrier accepting fence_space is deprecated."
462+
"Use barrier() without a fence_space instead.")
464463
void barrier(access::fence_space accessSpace =
465464
access::fence_space::global_and_local) const {
466465
#ifdef __SYCL_DEVICE_ONLY__

0 commit comments

Comments
 (0)