MCPcopy Create free account
hub / github.com/andrewkchan/deepseek.cpp / save

Method save

src/debug.cpp:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4template <typename T>
5bool BinaryDumper::save(const std::string& filename, const T* data, size_t count) {
6 std::ofstream file(filename, std::ios::binary);
7 if (!file) return false;
8
9 // Write count first
10 file.write(reinterpret_cast<const char*>(&count), sizeof(count));
11 // Write T data
12 file.write(reinterpret_cast<const char*>(data), count * sizeof(T));
13
14 return file.good();
15}
16
17template bool BinaryDumper::save<float>(const std::string&, const float*, size_t);
18template bool BinaryDumper::save<f16_t>(const std::string&, const f16_t*, size_t);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected