Special case: regular (i.e. non-control) input ports can only have one fanin. If port.port_id is out of range or is a control dependency, then an empty OutputPort is returned.
| 168 | // fanin. If port.port_id is out of range or is a control dependency, then an |
| 169 | // empty OutputPort is returned. |
| 170 | const OutputPort GetRegularFanin(const InputPort& port) const { |
| 171 | if (port.port_id < 0 || |
| 172 | port.port_id > |
| 173 | gtl::FindWithDefault(max_regular_input_port_, port.node, -1)) { |
| 174 | return OutputPort(); |
| 175 | } |
| 176 | |
| 177 | TensorId tensor_id = ParseTensorName(port.node->input(port.port_id)); |
| 178 | return GetOutputPort(tensor_id.node(), tensor_id.index()); |
| 179 | } |
| 180 | |
| 181 | // Checks if a tensor id is a fanin of the node. |
| 182 | bool HasFanin(const NodeDefT& node, const TensorId& fanin) const { |
nothing calls this directly
no test coverage detected