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

NullTrace

struct NullTrace

Zero-sized no-op trace buffer.

store is pass; the struct has no fields so it contributes 0 kernel-arg bytes when passed as an argument. Combined with a comptime if enable_trace: guard at every call site, the no-trace path emits zero PTX for instrumentation.

Implemented traits​

AnyType, Copyable, DevicePassable, ImplicitlyCopyable, ImplicitlyDeletable, Movable, RegisterPassable, TraceBuf, TrivialRegisterPassable

comptime members​

device_type​

comptime device_type = NullTrace

Device-side type alias. NullTrace is trivially device-passable.

Methods​

__init__​

def __init__() -> Self

Constructs a zero-sized no-op trace buffer.

store​

def store(self, offset: Int, val: UInt64)

No-op store. The body compiles away entirely.

Args:

  • ​offset (Int): Unused.
  • ​val (UInt64): Unused.

get_type_name​

static def get_type_name() -> String

Returns the type name for runtime diagnostics.

Returns:

String: Always "NullTrace".