MCPcopy
hub / github.com/jundot/omlx / append

Method append

omlx/cache/paged_cache.py:324–339  ·  view source on GitHub ↗

Append a block to the end (MRU position). Args: block: Block to append

(self, block: CacheBlock)

Source from the content-addressed store, hash-verified

322 self.num_free_blocks -= 1
323
324 def append(self, block: CacheBlock) -> None:
325 """
326 Append a block to the end (MRU position).
327
328 Args:
329 block: Block to append
330 """
331 last = self.fake_tail.prev_free_block
332 assert last is not None
333
334 last.next_free_block = block
335 block.prev_free_block = last
336 block.next_free_block = self.fake_tail
337 self.fake_tail.prev_free_block = block
338
339 self.num_free_blocks += 1
340
341 def append_n(self, blocks: List[CacheBlock]) -> None:
342 """

Callers 15

test_appendMethod · 0.95
validateMethod · 0.80
_build_quant_planFunction · 0.80
__getitem__Method · 0.80
reshapeMethod · 0.80
_fake_splitFunction · 0.80
_fake_padFunction · 0.80
pop_packedMethod · 0.80
popMethod · 0.80

Calls

no outgoing calls

Tested by 15

test_appendMethod · 0.76
run_inlineMethod · 0.64
fake_unloadMethod · 0.64
fake_unloadMethod · 0.64
mock_sleepMethod · 0.64
mock_get_activeMethod · 0.64
record_sleepMethod · 0.64
fake_applyFunction · 0.64