| 566 | |
| 567 | template <typename T> |
| 568 | internal::ShapeTreeNode<T>* ShapeTree<T>::Lookup(ShapeIndexView index) { |
| 569 | Index* iter = &index_table_[0]; |
| 570 | for (const int64 i : index) { |
| 571 | CHECK_GE(i, 0); |
| 572 | #ifndef NDEBUG |
| 573 | CHECK_LT(i, iter->children_count); |
| 574 | #endif |
| 575 | iter = &index_table_[iter->children_start + i]; |
| 576 | } |
| 577 | |
| 578 | return &nodes_[iter->index]; |
| 579 | } |
| 580 | |
| 581 | template <typename T> |
| 582 | const internal::ShapeTreeNode<T>* ShapeTree<T>::Lookup( |
no outgoing calls