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

EntryBuilder

struct EntryBuilder[N: Int, phase: Phase]

Appends ScheduleEntry values into a fixed-size array.

Encapsulates the repeated entries[t] = ScheduleEntry(...); t += 1 pattern, auto-tracking the write position and phase.

Fields​

  • ​entries (InlineArray[ScheduleEntry, N]):
  • ​pos (Int):

Implemented traits​

AnyType, ImplicitlyDestructible

Methods​

__init__​

__init__(out self, pos: Int = 0)

__init__(out self, entries: InlineArray[ScheduleEntry, N], pos: Int = 0)

Wrap an existing entries array (e.g. from a caller).

emit​

emit(mut self, op: OpDesc, prefetch: Bool = False)

Append one entry and advance the position.

emit_if​

emit_if(mut self, op: OpDesc, prefetch: Bool = False)

Emit only if op is present (not the NONE sentinel).

emit_flag​

emit_flag(mut self, op: OpDesc, flag: Bool)

Emit only if flag is True.