| 149 | } |
| 150 | |
| 151 | static void ggml_dyn_tallocr_remove_block(struct tallocr_chunk * chunk, int idx) { |
| 152 | // shift all elements after idx by 1 to the left, overwriting the element at idx |
| 153 | for (int i = idx; i < chunk->n_free_blocks; i++) { |
| 154 | chunk->free_blocks[i] = chunk->free_blocks[i+1]; |
| 155 | } |
| 156 | chunk->n_free_blocks--; |
| 157 | } |
| 158 | |
| 159 | static int ggml_dyn_tallocr_new_chunk(struct ggml_dyn_tallocr * alloc, size_t min_size) { |
| 160 | if (alloc->n_chunks >= GGML_VBUFFER_MAX_CHUNKS) { |
no outgoing calls
no test coverage detected