Skip to main content

Mojo module

pointer

Implements the Pointer type.

You can import these APIs from the memory package. For example:

from memory import Pointer

comptime values

GPUAddressSpace

comptime GPUAddressSpace = AddressSpace

Deprecated: Use AddressSpace instead. This alias is provided for backward compatibility and will be removed in a future release.

ImmutPointer

comptime ImmutPointer[type: AnyType, origin: ImmutOrigin, *, address_space: AddressSpace = AddressSpace.GENERIC] = Pointer[type, origin, address_space]

An immutable pointer.

Parameters

  • type (AnyType): The pointee type.
  • origin (ImmutOrigin): The origin of the pointer.
  • address_space (AddressSpace): The address space of the pointer.

MutPointer

comptime MutPointer[type: AnyType, origin: MutOrigin, *, address_space: AddressSpace = AddressSpace.GENERIC] = Pointer[type, origin, address_space]

A mutable pointer.

Parameters

  • type (AnyType): The pointee type.
  • origin (MutOrigin): The origin of the pointer.
  • address_space (AddressSpace): The address space of the pointer.

Structs

Was this page helpful?