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

Function LITE_tensor_copy

lite/lite-c/src/tensor.cpp:149–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149int LITE_tensor_copy(LiteTensor dst_tensor, const LiteTensor src_tensor) {
150 LITE_CAPI_BEGIN();
151 LITE_ASSERT(dst_tensor && src_tensor, "The tensor pass to LITE c_api is null");
152 static_cast<lite::Tensor*>(dst_tensor)
153 ->copy_from(*static_cast<lite::Tensor*>(src_tensor));
154 LITE_CAPI_END();
155}
156
157int LITE_tensor_share_memory_with(LiteTensor dst_tensor, const LiteTensor src_tensor) {
158 LITE_CAPI_BEGIN();

Callers 1

TESTFunction · 0.85

Calls 1

copy_fromMethod · 0.45

Tested by 1

TESTFunction · 0.68