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

Method make_proxy

src/core/impl/tensor.cpp:318–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316template <class Trait>
317template <class RTrait, typename>
318TensorStorage<Trait> TensorStorage<Trait>::make_proxy(
319 const TensorStorage<RTrait>& src) {
320 mgb_assert(
321 src.comp_node().mem_node() == CompNode::default_cpu().mem_node(),
322 "proxy source should be on CPU; got %s",
323 src.comp_node().to_string().c_str());
324 src.ptr();
325 return {true, src.m_comp_node, src.m_size, src.m_capacity,
326 src.m_offset, src.m_data, src.m_ref_ptr};
327}
328
329template <class Trait>
330void TensorStorage<Trait>::on_invalid_comp_node() {

Callers

nothing calls this directly

Calls 4

mem_nodeMethod · 0.45
comp_nodeMethod · 0.45
to_stringMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected