powered by
Clears all tensor allocations in the context memory pool. The context can be reused without recreating it. This is more efficient than free + init for temporary operations.
ggml_reset(ctx)
NULL (invisible)
GGML context pointer
# \donttest{ ctx <- ggml_init(1024 * 1024) a <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 100) ggml_reset(ctx) b <- ggml_new_tensor_1d(ctx, GGML_TYPE_F32, 200) ggml_free(ctx) # }
Run the code above in your browser using DataLab