buffer.fence
← buffer dialect
Order the executing thread's memory accesses across storage roots using an explicit atomic ordering and synchronization scope. This applies to ordinary functions and kernels, including accesses through typed views and vectors. Acquire and release fences participate in synchronization through matching atomic observations and publications; they do not rendezvous with other invocations or complete independent asynchronous transfers. The backing memory and target must support the requested synchronization domain.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
MemoryFence |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Attribute |
scope |
enum AtomicScope |
required |
Synchronization domain of the ordered memory effects. |
| Attribute |
ordering |
enum AtomicFenceOrdering |
required |
Acquire, release, acquire-release, or sequentially consistent ordering. |
Examples
buffer.fence scope(system) ordering(acquire)
buffer.fence scope(device) ordering(release)