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

Function gguf_write_to_file_ptr

external/ggml/src/gguf.cpp:1515–1526  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1513 gw.write_tensor_data(ctx->info[i], offset_data, ctx->alignment);
1514 }
1515}
1516
1517void gguf_write_to_buf(const struct gguf_context * ctx, std::vector<int8_t> & buf, bool only_meta) {
1518 gguf_writer_buf gw(buf);
1519 gguf_write_out(ctx, gw, only_meta);
1520}
1521
1522bool gguf_write_to_file_ptr(const struct gguf_context * ctx, FILE * file, bool only_meta) {
1523 GGML_ASSERT(file);
1524
1525 try {
1526 gguf_writer_file gw(file);
1527 gguf_write_out(ctx, gw, only_meta);
1528 } catch (const std::runtime_error& ex) {
1529 GGML_LOG_ERROR("%s: failed to write GGUF data: %s\n", __func__, ex.what());

Callers 1

gguf_write_to_fileFunction · 0.85

Calls 1

gguf_write_outFunction · 0.85

Tested by

no test coverage detected