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

Function deserialize_read_pod

src/rdnn/impl/algo_chooser.cpp:297–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297static Algorithm::Info::Desc deserialize_read_pod(
298 const std::string& data, size_t offset = 0) {
299 Algorithm::Info::Desc ret;
300#define cb(_val, _type) \
301 _val = megdnn::Algorithm::deserialize_read_pod<_type>(data.data(), offset); \
302 offset += sizeof(_val)
303
304 cb(ret.handle_type, megdnn::Handle::HandleType);
305 cb(ret.type, uint32_t);
306
307 uint32_t param_size = 0;
308 uint32_t name_size = 0;
309 cb(param_size, uint32_t);
310 cb(name_size, uint32_t);
311
312 if (param_size > 0) {
313 ret.param = std::string(data.data() + offset, param_size);
314 offset += param_size;
315 }
316 if (name_size > 0) {
317 ret.name = std::string(data.data() + offset, name_size);
318 offset += name_size;
319 }
320 return ret;
321}
322
323} // namespace
324

Callers 1

Calls 2

cbFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected