| 151 | while_ctx_(nullptr) {} |
| 152 | |
| 153 | void Node::Initialize(int id, int cost_id, |
| 154 | std::shared_ptr<NodeProperties> props) { |
| 155 | DCHECK_EQ(id_, -1); |
| 156 | DCHECK(in_edges_.empty()); |
| 157 | DCHECK(out_edges_.empty()); |
| 158 | id_ = id; |
| 159 | cost_id_ = cost_id; |
| 160 | |
| 161 | props_ = std::move(props); |
| 162 | // Initialize the class_ based on the type string |
| 163 | class_ = GetNodeClassForOp(props_->node_def.op()); |
| 164 | } |
| 165 | |
| 166 | void Node::Clear() { |
| 167 | in_edges_.clear(); |