MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / write_buffer

Function write_buffer

src/file_buffer.cpp:73–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void write_buffer(const fs::path& filename, const char* buffer, std::size_t size)
74{
75 std::ofstream os(filename, std::ios::out | std::ios::binary);
76 if(os.fail())
77 MIGRAPHX_THROW("Failure opening file: " + filename);
78 os.write(buffer, size);
79 if(os.bad())
80 MIGRAPHX_THROW("Error writing file: " + filename);
81}
82
83void write_buffer(const fs::path& filename, const std::vector<char>& buffer)
84{

Callers 8

mainFunction · 0.85
read_weight_filesFunction · 0.85
compileMethod · 0.85
from_bufferMethod · 0.85
save_argumentFunction · 0.85
write_stringFunction · 0.85
saveFunction · 0.85
mainFunction · 0.85

Calls 4

failMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 2

mainFunction · 0.68
read_weight_filesFunction · 0.68