Skip to content

Commit 902dadc

Browse files
authored
[SYCL] Add alternative to deprecated barrier() function for sub-group (#13276)
Add an alternative in the deprecation message for barrier() method on a sub-group. This should help clients move closer to conformant code.
1 parent a318776 commit 902dadc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sycl/include/sycl/sub_group.hpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,9 @@ struct sub_group {
554554
}
555555

556556
/* --- synchronization functions --- */
557-
__SYCL_DEPRECATED("Sub-group barrier with no arguments is deprecated.")
557+
__SYCL_DEPRECATED(
558+
"Sub-group barrier with no arguments is deprecated."
559+
"Use sycl::group_barrier with the sub-group as the argument instead.")
558560
void barrier() const {
559561
#ifdef __SYCL_DEVICE_ONLY__
560562
__spirv_ControlBarrier(
@@ -569,8 +571,9 @@ struct sub_group {
569571
#endif
570572
}
571573

572-
__SYCL_DEPRECATED("Sub-group barrier accepting fence_space is deprecated."
573-
"Use barrier() without a fence_space instead.")
574+
__SYCL_DEPRECATED(
575+
"Sub-group barrier accepting fence_space is deprecated."
576+
"Use sycl::group_barrier with the sub-group as the argument instead.")
574577
void barrier(access::fence_space accessSpace) const {
575578
#ifdef __SYCL_DEVICE_ONLY__
576579
int32_t flags = sycl::detail::getSPIRVMemorySemanticsMask(accessSpace);

0 commit comments

Comments
 (0)