| 301 | } |
| 302 | |
| 303 | TfLiteStatus ArenaPlanner::CalculateDeallocationOfInternalTensors( |
| 304 | int node_index) { |
| 305 | if (node_index < static_cast<int>(graph_info_->num_nodes())) { |
| 306 | const TfLiteNode& node = graph_info_->node(static_cast<size_t>(node_index)); |
| 307 | TfLiteIntArray* node_temporaries = node.temporaries; |
| 308 | for (int i = 0; i < node_temporaries->size; ++i) { |
| 309 | int tensor_index = node_temporaries->data[i]; |
| 310 | TF_LITE_ENSURE_STATUS(CalculateTensorDeallocation(tensor_index)); |
| 311 | } |
| 312 | } |
| 313 | return kTfLiteOk; |
| 314 | } |
| 315 | |
| 316 | } // namespace tflite |