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

Method copy_from

src/core/impl/tensor.cpp:342–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340template <>
341template <>
342MGE_WIN_DECLSPEC_FUC void TensorStorage<HostTensorStorageTrait>::copy_from(
343 const TensorStorage<HostTensorStorageTrait>& src, size_t size) const {
344 mgb_assert(size <= this->size() && size <= src.size());
345 memcpy(ptr(), src.ptr(), size);
346}
347
348// device to host
349template <>

Callers 15

check_dump_by_computeFunction · 0.45
test_serializer_APlusBFunction · 0.45
test_serializer_memshareFunction · 0.45
TESTFunction · 0.45
run_compute_testFunction · 0.45

Calls 12

sizeMethod · 0.95
comp_nodeFunction · 0.85
ptrMethod · 0.45
comp_nodeMethod · 0.45
to_stringMethod · 0.45
get_ref_ptrMethod · 0.45
offsetMethod · 0.45
copy_to_host_refMethod · 0.45
syncMethod · 0.45
copy_to_device_refMethod · 0.45
device_typeMethod · 0.45
peer_copy_to_refMethod · 0.45

Tested by 15

check_dump_by_computeFunction · 0.36
test_serializer_APlusBFunction · 0.36
test_serializer_memshareFunction · 0.36
TESTFunction · 0.36
run_compute_testFunction · 0.36