Skip to main content
Log in

Mojo function

load_acquire

load_acquire[type: DType, //, *, scope: Scope = Scope(6), memory: Bool = True](ptr: UnsafePointer[SIMD[type, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin]) -> SIMD[type, 1]

Performs an atomic load operation with acquire memory ordering semantics.

Note: - Only supported on NVIDIA GPUs. - Maps directly to PTX ld.acquire instruction. - Ensures subsequent memory operations don't execute until after this load.

Args:

  • ptr (UnsafePointer[SIMD[type, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin]): Pointer to the memory location to load from.

Returns:

The loaded value