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 module

pointer

Defines atoms for plain pointer loads and stores.

PointerLoad and PointerStore wrap one vector access through a pointer: width contiguous elements, such as ld.global.v4.f32 or st.shared.v2.b32 on NVIDIA GPUs, global_load_dwordx4 or ds_write_b128 on AMD GPUs, and a vector load or store on a CPU. The access claims align bytes of alignment, by default the whole vector's; a caller whose addresses are only element aligned claims less, and the backend then picks accesses that need no more. A load is never invariant: an immutable view only says the access reads, and other agents may write the memory. Each thread issues its own access at the base of the memory view it passes, so the memory map fixes the value bits and leaves lanes free. The registers are ready, and the memory written, when the call returns.

You can import these APIs from the layout.atoms.pointer module:

from layout.atoms.pointer import PointerLoad, PointerStore

Structsโ€‹

Was this page helpful?