mstar.engine.resources.kv.bounded.layout#
Host-side layout of one row of a bounded KV step.
A row’s retained keys are at most five contiguous ranges, in stream order:
the sink’s source part, the sink’s written part, the window’s source part and
the window’s ring (two ranges when it wraps). Its writes are at most three:
the sink’s unfilled part and the ring (again two when it wraps). Each is a
(start, length) pair in the source or the slot, so a step’s layout is a
small integer table, and the kernels need nothing else.
Functions
|
|
|
The reads and writes of a row whose stream holds |
Classes
|
- class mstar.engine.resources.kv.bounded.layout.RowLayout(reads, writes, span)[source]#
Bases:
NamedTuple- Parameters:
- mstar.engine.resources.kv.bounded.layout.row_layout(source_len, written, span, policy, sink_capacity, reverse=False)[source]#
The reads and writes of a row whose stream holds
source_len + writtenentries and gainsspanthis step. Slot offsets put the sink’s written part at[0, sink_capacity)and the ring after it. Withreversea step’s tokens join the stream last-first (seeBoundedKVConfig).