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

Method read_shared

src/serialization/impl/file.cpp:14–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12}
13
14SharedBuffer InputFile::read_shared(size_t size) {
15 std::shared_ptr<void> shptr{new uint8_t[size], [](uint8_t* p) { delete[] p; }};
16 read(shptr.get(), size);
17 return {std::move(shptr), size};
18}
19
20/* ====================== file impls ====================== */
21class InputFile::FsImpl final : public InputFile {

Callers 2

loadMethod · 0.80
loadMethod · 0.80

Calls 2

readFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected