IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

smem_edge_masked_load

def smem_edge_masked_load[dtype: DType, src_space: AddressSpace, //, width: Int](ptr: Pointer[Scalar[dtype], address_space=src_space], mask: Int16) -> SIMD[dtype, width]

Loads an edge-masked vector, treating ptr as threadgroup (shared) memory (Apple M5 only).

Like edge_masked_load but reinterprets any pointer as shared β€” for a generic-typed pointer to threadgroup memory. Emits AGX3 load.with.emask.local.

Constraints:

width in {1, 2, 4}, dtype 8/16/32/64-bit. Apple M5 only.

Parameters:

  • ​dtype (DType): Element type of the pointer (inferred).
  • ​src_space (AddressSpace): Pointer source address space (inferred).
  • ​width (Int): Number of elements to load.

Args:

Returns:

SIMD[dtype, width]: A SIMD[dtype, width]; in-range lanes loaded, masked-off lanes zero.