Gets the number of ports in the immediate fanin of a node. Count the controlling nodes iff include_controlling_nodes is true.
| 244 | // Gets the number of ports in the immediate fanin of a node. Count the |
| 245 | // controlling nodes iff include_controlling_nodes is true. |
| 246 | int NumFanins(const NodeDefT& node, bool include_controlling_nodes) const { |
| 247 | if (include_controlling_nodes) { |
| 248 | return node.input_size(); |
| 249 | } |
| 250 | return gtl::FindWithDefault(max_regular_input_port_, &node, -1) + 1; |
| 251 | } |
| 252 | |
| 253 | // Gets the number of ports in the immediate fanout of a node. Count the |
| 254 | // controlled nodes iff include_controlled_nodes is true. |