| 621 | } |
| 622 | |
| 623 | const NodeTypeId* GraphTypeTopologyView::GetNode( |
| 624 | absl::string_view node_name, const TypeAttrId& type_attr) const { |
| 625 | DCHECK(is_initialized()) << "GraphTypeTopologyView is not initialized"; |
| 626 | NodeTypeKey key(node_name, type_attr); |
| 627 | const auto it = node_type_name_to_index_.find(key); |
| 628 | return it == node_type_name_to_index_.end() |
| 629 | ? nullptr |
| 630 | : &node_type_attrs_.at(it->second); |
| 631 | } |
| 632 | |
| 633 | const NodeTypeId* GraphTypeTopologyView::GetNode(int node_idx) const { |
| 634 | DCHECK(is_initialized()) << "GraphTypeTopologyView is not initialized"; |