Skip to content

Commit 9576b31

Browse files
committed
Add note about work-item scope atomics
In OpenCL, these atomics are only required to support a very specific use-case involving images, and are forbidden in all other contexts. In SYCL, we would like a work-item to be viewed as a degenerate case of a group containing a single work-item. Work-item scope atomics should thus be permitted, and their effect should be equivalent to non-atomic operations.
1 parent aaa3ee5 commit 9576b31

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

adoc/chapters/architecture.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,13 @@ values:
10891089
the memory allocation containing the referenced object, as defined by the
10901090
capabilities of <<buffer,buffers>> and <<usm>>.
10911091

1092+
{note}An atomic operation with work-item scope is effectively the same as a
1093+
non-atomic operation.
1094+
[code]#sycl::memory_scope::work_item# is primarily intended to simplify generic
1095+
programming and to provide a meaningful way to describe the behavior of
1096+
<<group,groups>> containing a single work-item.
1097+
{endnote}
1098+
10921099
The memory scopes are listed above from narrowest
10931100
([code]#memory_scope::work_item#) to widest ([code]#memory_scope::system#).
10941101

0 commit comments

Comments
 (0)