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

Method to_bytes

src/custom/impl/param.cpp:139–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139std::string Param::to_bytes(void) const {
140 std::string res;
141 std::map<std::string, ParamVal> ordered_vals(
142 TypedRef(ParamImpl, m_impl.get()).m_vals.begin(),
143 TypedRef(ParamImpl, m_impl.get()).m_vals.end());
144 for (auto&& kv : ordered_vals) {
145 res += ParamVal::to_bytes(kv.second);
146 }
147 return res;
148}
149
150void Param::from_bytes(const std::string& bytes) {
151 std::map<std::string, ParamVal> ordered_vals(

Callers 3

TESTFunction · 0.45
custom_dumperFunction · 0.45
mainFunction · 0.45

Calls 3

beginMethod · 0.45
getMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.36