A switch node for control flow.
| 636 | |
| 637 | // A switch node for control flow. |
| 638 | Node* AddControlSwitch(NodeBuilder::NodeOut input1, NodeBuilder::NodeOut input2, |
| 639 | const string& device_name, |
| 640 | const GraphDefBuilder::Options& bopts) { |
| 641 | Node* res_node = |
| 642 | ops::BinaryOp("Switch", std::move(input1), std::move(input2), bopts); |
| 643 | if (bopts.HaveError()) return nullptr; |
| 644 | res_node->set_assigned_device_name(device_name); |
| 645 | return res_node; |
| 646 | } |
| 647 | |
| 648 | // A next_iteration node for control flow. |
| 649 | Node* AddControlNext(NodeBuilder::NodeOut input, const string& device_name, |
no test coverage detected