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β
Methodsβ
__init__β
def __init__(out self, pos: Int = 0)
Constructs an empty builder at the given write position.
def __init__(out self, entries: InlineArray[ScheduleEntry, N], pos: Int = 0)
Wrap an existing entries array (e.g. from a caller).
emitβ
def emit(mut self, op: OpDesc, prefetch: Bool = False)
Append one entry and advance the position.
emit_ifβ
def emit_if(mut self, op: OpDesc, prefetch: Bool = False)
Emit only if op is present (not the NONE sentinel).
emit_flagβ
def emit_flag(mut self, op: OpDesc, flag: Bool)
Emit only if flag is True.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!