File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,8 @@ class llama_kv_cells_unified {
213213 seq_pos[seq_id].insert (pos[i]);
214214 }
215215
216+ // the minimum position of sequence seq_id currently present in any of the cells
217+ // return -1 if the sequence is not present
216218 llama_pos seq_pos_min (llama_seq_id seq_id) const {
217219 assert (seq_id >= 0 );
218220 assert (seq_id < LLAMA_MAX_PARALLEL_SEQUENCES);
@@ -224,6 +226,8 @@ class llama_kv_cells_unified {
224226 return *seq_pos[seq_id].begin ();
225227 }
226228
229+ // the maximum position of sequence seq_id currently present in any of the cells
230+ // return -1 if the sequence is not present
227231 llama_pos seq_pos_max (llama_seq_id seq_id) const {
228232 assert (seq_id >= 0 );
229233 assert (seq_id < LLAMA_MAX_PARALLEL_SEQUENCES);
@@ -349,7 +353,7 @@ class llama_kv_cells_unified {
349353 // the bitset seq[i] tells us which sequences are currently occupying the i-th cell
350354 std::vector<bits_t > seq;
351355
352- // the set seq_pos[s] tells us which positions are currently occupied by the s-th sequence
356+ // the set seq_pos[s] tells us which positions are currently present for sequence s
353357 // this way seq_pos[s].begin() and seq_pos[s].rbegin() give us the min/max positions currently in the cache
354358 std::set<llama_pos> seq_pos[LLAMA_MAX_PARALLEL_SEQUENCES];
355359
You can’t perform that action at this time.
0 commit comments