MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / write_to_file

Method write_to_file

src/core/impl/utils/visable_data_set.cpp:78–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void VisableDataSet::write_to_file() {
79 for (auto& i : m_file2content) {
80 auto f_objptr = json::Object::make();
81 auto&& f_obj = *f_objptr;
82 for (auto& c : i.second) {
83 auto c_objptr = json::Object::make();
84 auto&& c_obj = *c_objptr;
85 for (auto& j : m_filecontent2value[i.first + "/" + c]) {
86 c_obj[(*j).cast_final_safe<json::Object>()["id"]
87 ->cast_final_safe<json::String>()
88 .get_impl()] = j;
89 }
90 f_obj[c] = c_objptr;
91 }
92 f_objptr->writeto_fpath(output_file(m_logdir, i.first));
93 }
94}
95
96std::shared_ptr<json::Value> Chunk::to_json() const {
97 auto objptr = json::Object::make();

Callers

nothing calls this directly

Calls 4

output_fileFunction · 0.85
makeFunction · 0.50
get_implMethod · 0.45
writeto_fpathMethod · 0.45

Tested by

no test coverage detected