Skip to content

view.atomic.store

← view dialect

Atomically write one scalar view element at a full-rank logical index. Each execution is a distinct publication. Ordering is relaxed, release, or sequentially consistent. Target lowering must preserve the element width and atomicity at the requested scope without an exchange.

Operation contract

Property Value
Semantic phase executable
Traits ObservableEffect
Target contracts memory.atomic
Interfaces CachePolicy, MemoryAccess
Memory effects write view

Signature

Kind Name Type Cardinality Description
Operand value byte_pattern_scalar required Fixed-width byte-addressable scalar to publish.
Operand view view required Typed destination view.
Operand indices index variadic Dynamic logical element indices.
Attribute ordering enum AtomicStoreOrdering required Required atomic memory ordering.
Attribute scope enum AtomicScope required Required atomic synchronization scope.
Attribute cache_scope enum CacheScope optional Optional cache/coherency scope required by target lowering.
Attribute cache_temporal enum CacheTemporal optional Optional temporal cache policy required by target lowering.
Attribute static_indices i64_array required Static logical element indices with INT64_MIN sentinels for dynamics.

Verification constraints

  • SameElementType(value, view)

Examples

view.atomic.store %generation, %progress[0] {ordering = release, scope = system} : i32, view<1xi32>