Skip to main content

Mojo function

store_relaxed

store_relaxed[dtype: DType, //, *, scope: Scope = Scope(6), memory: Bool = True, alignment: Int = align_of[Scalar[dtype]]()](ptr: UnsafePointer[Scalar[dtype], address_space=address_space, mut=mut, origin=origin], value: Scalar[dtype])

Performs an atomic store with relaxed memory ordering semantics.

On NVIDIA, maps to PTX st.relaxed; on AMD, maps to POP atomic store with MONOTONIC ordering.

Was this page helpful?