Add an input to dst that comes from the "src_slot" output of the node named by "src_name".
| 1019 | // Add an input to dst that comes from the "src_slot" output of the |
| 1020 | // node named by "src_name". |
| 1021 | void AddInput(NodeDef* dst, StringPiece src_name, int src_slot) { |
| 1022 | if (src_slot == Graph::kControlSlot) { |
| 1023 | dst->add_input(strings::StrCat("^", src_name)); |
| 1024 | } else if (src_slot == 0) { |
| 1025 | dst->add_input(src_name.data(), src_name.size()); |
| 1026 | } else { |
| 1027 | dst->add_input(strings::StrCat(src_name, ":", src_slot)); |
| 1028 | } |
| 1029 | } |
| 1030 | |
| 1031 | // Each participating device needs to decide a) if there is a next iteration, |
| 1032 | // and b) if the loop terminates. We take the approach to encode this control |
no test coverage detected