| 49 | |
| 50 | #ifdef GGML_ALLOCATOR_DEBUG |
| 51 | static void add_allocated_tensor(ggml_tallocr_t alloc, struct ggml_tensor * tensor) { |
| 52 | for (int i = 0; i < 1024; i++) { |
| 53 | if (alloc->allocated_tensors[i] == NULL) { |
| 54 | alloc->allocated_tensors[i] = tensor; |
| 55 | return; |
| 56 | } |
| 57 | } |
| 58 | GGML_ASSERT(!"out of allocated_tensors"); |
| 59 | } |
| 60 | static void remove_allocated_tensor(ggml_tallocr_t alloc, struct ggml_tensor * tensor) { |
| 61 | for (int i = 0; i < 1024; i++) { |
| 62 | if (alloc->allocated_tensors[i] == tensor || |
no outgoing calls
no test coverage detected