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

Method share_memory_with

lite/src/tensor.cpp:209–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void Tensor::share_memory_with(const Tensor& src_tensor) {
210 LITE_ERROR_HANDLER_BEGIN
211 LITE_ASSERT(src_tensor.m_layout.ndim > 0, "To be shared tensor with empty layout.");
212 m_tensor_impl->share_memory_with(src_tensor.m_tensor_impl.get());
213 update_from_implement();
214 LITE_ERROR_HANDLER_END
215}
216
217void Tensor::set_layout(const Layout& layout) {
218 LITE_ERROR_HANDLER_BEGIN

Callers 3

TESTFunction · 0.45
TESTFunction · 0.45

Calls 1

getMethod · 0.45

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36