For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo trait
RowBound
Per-row live-column count and output sink for the bounded top-k kernels.
Every thread of a row's block calls row once, at kernel entry, with the
block's row index; the block is converged there, so an implementation may
use warp-collective operations. Per-row state the sink needs (a batch
lookup, say) is resolved there once rather than per store.
Implemented traits
AnyType,
Copyable,
Deinitable,
DevicePassable,
ImplicitlyCopyable,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
Sink
comptime Sink
Sink type the kernels write the row's selections through.
Required methods
row
def row(self, row: Int, out_idxs: Pointer[Int32, MutAnyOrigin]) -> Tuple[Int, Self.Sink]
Returns the live leading column count of row and its sink.
Args:
- row (
Int): Row index within the launch (the block index). - out_idxs (
Pointer[Int32, MutAnyOrigin]): The launch's flat[rows, K]output buffer.
Returns:
Tuple[Int, _Self.Sink]: The live column count, which the kernels clamp to [0, N], and
the sink for the row's output slots.