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

Method copy_from

lite/src/tensor.cpp:247–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void Tensor::copy_from(const Tensor& src) {
248 LITE_ERROR_HANDLER_BEGIN
249 LITE_ASSERT(
250 src.get_layout().ndim != 0,
251 "when tensor copy, the src tensor layout is empty.");
252 m_tensor_impl->copy_from(src.m_tensor_impl.get());
253 update_from_implement();
254 LITE_ERROR_HANDLER_END
255}
256
257void Tensor::update_from_implement() {
258 LITE_ERROR_HANDLER_BEGIN

Callers 15

init_graph_rtFunction · 0.45
np2tensor_try_borrowFunction · 0.45
ndarray_from_tensorFunction · 0.45
init_commonFunction · 0.45
runMethod · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
run_graphFunction · 0.45
TESTFunction · 0.45
BlobDataMethod · 0.45
MGB_CATCHFunction · 0.45

Calls 2

get_layoutMethod · 0.45
getMethod · 0.45

Tested by 10

runMethod · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
run_graphFunction · 0.36
TESTFunction · 0.36
test_io_no_copy_axFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
mgb_larFunction · 0.36