MCPcopy Create free account
hub / github.com/MegEngine/MegCC / write_file

Function write_file

runtime/example/standard_OS/lite_main.c:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41static void write_file(const char* file_name, void* ptr, size_t length) {
42 FILE* fout = fopen(file_name, "wb");
43 if (!fout) {
44 fprintf(stderr, "Open file error!!\n");
45 return;
46 }
47 size_t write_bytes = fwrite(ptr, 1, length, fout);
48 EXAMPLE_ASSERT(write_bytes == length);
49 fclose(fout);
50}
51
52static inline void run_model(
53 LiteNetwork model, const char* output_dir, int instance_cnt,

Callers 1

run_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected