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

Function LITE_get_tensor_memory

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

Source from the content-addressed store, hash-verified

163}
164
165int LITE_get_tensor_memory(const LiteTensor tensor, void** data) {
166 LITE_CAPI_BEGIN();
167 LITE_ASSERT(tensor, "The tensor pass to LITE c_api is null");
168 LITE_ASSERT(data, "The data ptr pass to LITE c_api is null");
169 *data = static_cast<lite::Tensor*>(tensor)->get_memory_ptr();
170 LITE_CAPI_END();
171}
172
173int LITE_get_tensor_memory_with_index(
174 const LiteTensor tensor, const size_t* index, size_t size, void** data) {

Callers 5

basic_c_interfaceFunction · 0.85
async_c_interfaceFunction · 0.85
basic_c_interfaceFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 1

get_memory_ptrMethod · 0.45

Tested by 2

TESTFunction · 0.68
TESTFunction · 0.68