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

Function LITE_reset_tensor

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

Source from the content-addressed store, hash-verified

97}
98
99int LITE_reset_tensor(LiteTensor tensor, const LiteLayout layout, void* prepared_data) {
100 LITE_CAPI_BEGIN();
101 LITE_ASSERT(tensor, "The tensor pass to LITE c_api is null");
102 LITE_ASSERT(prepared_data, "The prepared_data pass to LITE c_api is null");
103 static_cast<lite::Tensor*>(tensor)->reset(prepared_data, convert_to_layout(layout));
104 LITE_CAPI_END();
105}
106
107int LITE_tensor_reshape(LiteTensor tensor, const int* shape, int size) {
108 LITE_CAPI_BEGIN();

Callers 3

device_io_c_interfaceFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85

Calls 2

convert_to_layoutFunction · 0.85
resetMethod · 0.45

Tested by 2

TESTFunction · 0.68
TESTFunction · 0.68