Skip to content

Commit 5a6cd9b

Browse files
committed
Docs
1 parent a54fb5d commit 5a6cd9b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/intrinsics.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,28 @@ Declare memory that is local to a workgroup.
6666
localmemory(::Type{T}, dims) where T = localmemory(T, Val(dims))
6767
# @inline localmemory(::Type{T}, dims::Val{Dims}) where {T, Dims} = localmemory(T, dims, Val(gensym("static_shmem")))
6868

69+
"""
70+
barrier()
71+
72+
After a `barrier()` call, all read and writes to global and local memory
73+
from each thread in the workgroup are visible in from all other threads in the
74+
workgroup.
75+
76+
!!! note
77+
`barrier()` must be encountered by all workitems of a work-group executing the kernel or by none at all.
78+
79+
!!! note
80+
Backend implementations **must** implement:
81+
```
82+
@device_override barrier()
83+
```
84+
As well as the on-device functionality.
85+
"""
6986
function barrier()
7087
error("Group barrier used outside kernel or not captured")
7188
end
89+
90+
# TODO
7291
function print end
7392

7493

0 commit comments

Comments
 (0)