(self, P: "MLXProgramBuilder", n: Node)
| 220 | ) |
| 221 | |
| 222 | def __call__(self, P: "MLXProgramBuilder", n: Node) -> Slot: |
| 223 | assert n == self.head |
| 224 | |
| 225 | cache_slot, update_slot, start_slot = P.slot_map( |
| 226 | [self.cache, self.update, self.start_pos] |
| 227 | ) |
| 228 | |
| 229 | if self.ring_size > 0: |
| 230 | self._emit_ring_buffer(P, cache_slot, update_slot, start_slot) |
| 231 | else: |
| 232 | self._emit_linear(P, cache_slot, update_slot, start_slot) |
| 233 | |
| 234 | P.set_slot(n, cache_slot) |
| 235 | return cache_slot |
| 236 | |
| 237 | def _emit_linear(self, P: "MLXProgramBuilder", cache_slot, update_slot, start_slot): |
| 238 | """Emit a single SliceUpdate for linear (non-ring) cache.""" |
nothing calls this directly
no test coverage detected