| 163 | } |
| 164 | |
| 165 | int 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 | |
| 173 | int LITE_get_tensor_memory_with_index( |
| 174 | const LiteTensor tensor, const size_t* index, size_t size, void** data) { |