| 97 | } |
| 98 | |
| 99 | int 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 | |
| 107 | int LITE_tensor_reshape(LiteTensor tensor, const int* shape, int size) { |
| 108 | LITE_CAPI_BEGIN(); |