| 222 | } |
| 223 | |
| 224 | void Tensor::reset(void* prepared_data, size_t data_length_in_byte) { |
| 225 | LITE_ERROR_HANDLER_BEGIN |
| 226 | LITE_ASSERT(m_layout.ndim, "Tensor layout is empty, please reset with layout"); |
| 227 | LITE_ASSERT( |
| 228 | data_length_in_byte >= get_tensor_total_size_in_byte(), |
| 229 | "the memory reset to the tensor is too small."); |
| 230 | m_tensor_impl->reset(prepared_data); |
| 231 | LITE_ERROR_HANDLER_END |
| 232 | } |
| 233 | |
| 234 | void Tensor::reset(void* prepared_data, const Layout& layout) { |
| 235 | LITE_ERROR_HANDLER_BEGIN |
no outgoing calls