Skip to content

Commit

Permalink
[SYCL] Add alternative to deprecated barrier() function for sub-group (
Browse files Browse the repository at this point in the history
…#13276)

Add an alternative in the deprecation message for barrier() method on a
sub-group. This should help clients move closer to conformant code.
  • Loading branch information
lbushi25 committed Apr 5, 2024
1 parent a318776 commit 902dadc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions sycl/include/sycl/sub_group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ struct sub_group {
}

/* --- synchronization functions --- */
__SYCL_DEPRECATED("Sub-group barrier with no arguments is deprecated.")
__SYCL_DEPRECATED(
"Sub-group barrier with no arguments is deprecated."
"Use sycl::group_barrier with the sub-group as the argument instead.")
void barrier() const {
#ifdef __SYCL_DEVICE_ONLY__
__spirv_ControlBarrier(
Expand All @@ -569,8 +571,9 @@ struct sub_group {
#endif
}

__SYCL_DEPRECATED("Sub-group barrier accepting fence_space is deprecated."
"Use barrier() without a fence_space instead.")
__SYCL_DEPRECATED(
"Sub-group barrier accepting fence_space is deprecated."
"Use sycl::group_barrier with the sub-group as the argument instead.")
void barrier(access::fence_space accessSpace) const {
#ifdef __SYCL_DEVICE_ONLY__
int32_t flags = sycl::detail::getSPIRVMemorySemanticsMask(accessSpace);
Expand Down

0 comments on commit 902dadc

Please sign in to comment.