| 2306 | } |
| 2307 | |
| 2308 | size_t ggml_used_mem(const struct ggml_context * ctx) { |
| 2309 | return ctx->objects_end == NULL ? 0 : ctx->objects_end->offs + ctx->objects_end->size; |
| 2310 | } |
| 2311 | |
| 2312 | size_t ggml_set_scratch(struct ggml_context * ctx, struct ggml_scratch scratch) { |
| 2313 | const size_t result = ctx->scratch.data ? ctx->scratch.offs : 0; |