MCPcopy Create free account
hub / github.com/Samsung/ONE / writeDataToFile

Function writeDataToFile

compiler/circle-eval-diff/src/CircleEvalDiff.cpp:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void writeDataToFile(const std::string &filename, const char *data, size_t data_size)
71{
72 std::ofstream fs(filename, std::ofstream::binary);
73 if (fs.fail())
74 throw std::runtime_error("Cannot open file \"" + filename + "\".\n");
75 if (fs.write(data, data_size).fail())
76 {
77 throw std::runtime_error("Failed to write data to file \"" + filename + "\".\n");
78 }
79}
80
81void checkOutputs(const luci::Module *first, const luci::Module *second)
82{

Callers 1

evalDiffMethod · 0.70

Calls 2

failMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected