Mojo function
store_release
store_release[type: DType, //, scope: Scope = Scope(6), memory: Bool = True](ptr: UnsafePointer[SIMD[type, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin], value: SIMD[type, 1])
Performs an atomic store with release memory ordering semantics.
This function provides a memory barrier that ensures all previous memory operations from the calling thread are visible to other threads before this store is performed.
Note: - Only supported on NVIDIA GPUs. - Maps directly to PTX st.release instruction. - Ensures all previous memory operations complete before this store. - Critical for implementing synchronization primitives.
Parameters:
- type (
DType
): The data type to store. - scope (
Scope
): Memory scope for the operation (default: Scope.SYSTEM). - memory (
Bool
): Whether to include memory side effects in constraints (default: True).
Args:
- ptr (
UnsafePointer[SIMD[type, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin]
): Pointer to the memory location to store to. - value (
SIMD[type, 1]
): Value to store.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!