MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / clear

Method clear

smallthinker/src/llama-kv-cache-recurrent.cpp:119–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void llama_kv_cache_recurrent::clear() {
120 for (int32_t i = 0; i < (int32_t) size; ++i) {
121 cells[i].pos = -1;
122 cells[i].seq_id.clear();
123 cells[i].src = -1;
124 cells[i].tail = -1;
125 }
126 head = 0;
127 used = 0;
128
129 for (auto & buf : bufs) {
130 ggml_backend_buffer_clear(buf.get(), 0);
131 }
132}
133
134bool llama_kv_cache_recurrent::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos p1) {
135 uint32_t new_head = size;

Callers 4

seq_rmMethod · 0.45
seq_keepMethod · 0.45
find_slotMethod · 0.45

Calls 2

getMethod · 0.45

Tested by

no test coverage detected