| 3 | |
| 4 | template <typename T> |
| 5 | bool 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 | |
| 17 | template bool BinaryDumper::save<float>(const std::string&, const float*, size_t); |
| 18 | template bool BinaryDumper::save<f16_t>(const std::string&, const f16_t*, size_t); |
nothing calls this directly
no outgoing calls
no test coverage detected