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
Pipe
struct Pipe[N: Int]
A compile-time sequence of N pipeline operations.
Build sequences using the >> operator to chain ops into a pipeline:
pipe(ld()) >> st() >> br() >> frag[0]() >> sb()Convert to schedule entries for a given phase:
my_pipe.as_schedule[Phase.PROLOGUE]()Concatenate two pipes:
pipe_a >> pipe_b # Pipe[A+B]Fieldsβ
- βops (
InlineArray[OpDesc, N]):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable
Methodsβ
__init__β
__init__(out self)
__rshift__β
__rshift__(self, op: OpDesc) -> Pipe[(N + 1)]
Append a single op: pipe >> op -> Pipe[N+1].
Returns:
__rshift__[M: Int](self, other: Pipe[M]) -> Pipe[(N + M)]
Concatenate two pipes: Pipe[N] >> Pipe[M] -> Pipe[N+M].
Returns:
as_scheduleβ
as_schedule[phase: Phase](self) -> InlineArray[ScheduleEntry, N]
Convert to schedule entries with sequential time slots.
Returns:
as_schedule[phase: Phase](self, offset: Int) -> InlineArray[ScheduleEntry, N]
Convert to schedule entries with time slots starting at offset.
Returns:
emit_intoβ
emit_into[MaxN: Int, phase: Phase](self, mut entries: InlineArray[ScheduleEntry, MaxN], offset: Int = 0) -> Int
Write ops into a larger schedule array starting at offset.
Returns the new offset (offset + N), allowing chained writes.
Returns:
emit_into_bodyβ
emit_into_body(self, mut body: LoopBody, offset: Int = 0) -> Int
Write ops into a LoopBody's ops array as OpNodes.
Returns the new offset (offset + N).
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!