| 912 | } |
| 913 | |
| 914 | TfLiteStatus Subgraph::GetNodeAndRegistration( |
| 915 | int node_index, TfLiteNode** node, TfLiteRegistration** registration) { |
| 916 | TF_LITE_ENSURE(&context_, node_index >= 0); |
| 917 | auto nodes_size = nodes_and_registration_.size(); |
| 918 | TF_LITE_ENSURE(&context_, static_cast<size_t>(node_index) < nodes_size); |
| 919 | TF_LITE_ENSURE(&context_, node != nullptr && registration != nullptr); |
| 920 | auto& node_and_reg = nodes_and_registration_[node_index]; |
| 921 | *node = &node_and_reg.first; |
| 922 | *registration = &node_and_reg.second; |
| 923 | return kTfLiteOk; |
| 924 | } |
| 925 | |
| 926 | TfLiteStatus Subgraph::GetNodeAndRegistration( |
| 927 | struct TfLiteContext* context, int node_index, TfLiteNode** node, |