MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / ggml_dyn_tallocr_reset

Function ggml_dyn_tallocr_reset

external/ggml/src/ggml-alloc.c:351–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351static void ggml_dyn_tallocr_reset(struct ggml_dyn_tallocr * alloc) {
352 for (int i = 0; i < GGML_VBUFFER_MAX_CHUNKS; i++) {
353 free(alloc->chunks[i]);
354 alloc->chunks[i] = NULL;
355 }
356 alloc->n_chunks = 0;
357
358#ifdef GGML_ALLOCATOR_DEBUG
359 for (int i = 0; i < 1024; i++) {
360 alloc->allocated_tensors[i].tensor = NULL;
361 }
362#endif
363}
364
365static struct ggml_dyn_tallocr * ggml_dyn_tallocr_new(size_t alignment, size_t max_buffer_size) {
366 struct ggml_dyn_tallocr * alloc = (struct ggml_dyn_tallocr *)malloc(sizeof(struct ggml_dyn_tallocr));

Callers 2

ggml_dyn_tallocr_newFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected