| 151 | } |
| 152 | |
| 153 | void CostModel::SetNumOutputs(const Node* node, int num_outputs) { |
| 154 | const int id = Id(node); |
| 155 | if (id < 0) return; |
| 156 | // Do not resize the number of slots before checking its existing number of |
| 157 | // slots. |
| 158 | Ensure(id, 0); |
| 159 | auto perslot = &slot_bytes_[id]; |
| 160 | if (!perslot->empty()) { |
| 161 | CHECK_EQ(num_outputs, perslot->size()) |
| 162 | << "Cannot resize slot_bytes, node=" << node->name(); |
| 163 | } |
| 164 | Ensure(id, num_outputs); |
| 165 | } |
| 166 | |
| 167 | void CostModel::RecordCount(const Node* node, int count) { |
| 168 | const int id = Id(node); |
no test coverage detected