IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo struct

NullPointer

struct NullPointer[dtype_: DType, address_space_: AddressSpace = AddressSpace.GENERIC]

A pointer known at compile time to be null, used when an optional pointer argument is absent.

Parameters​

  • ​dtype_ (DType): Element type of the pointed-to values.
  • ​address_space_ (AddressSpace): GPU address space of the pointer (defaults to AddressSpace.GENERIC).

Implemented traits​

AnyType, Copyable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, OptionalPointer, RegisterPassable, TrivialRegisterPassable

comptime members​

address_space​

comptime address_space = address_space_

dtype​

comptime dtype = dtype_

is_null​

comptime is_null = True

PtrType​

comptime PtrType = Pointer[Scalar[NullPointer[dtype_, address_space_].dtype], ImmutAnyOrigin, address_space=NullPointer[dtype_, address_space_].address_space, _safe=False]

Methods​

__init__​

def __init__() -> Self

value​

def value(self) -> Self.PtrType

Returns:

Self.PtrType

Was this page helpful?