An enter node for control flow.
| 608 | |
| 609 | // An enter node for control flow. |
| 610 | Node* AddControlEnter(Graph* g, const string& node_name, |
| 611 | const string& device_name, const string& frame_name, |
| 612 | const int parallel_iterations, Status* status) { |
| 613 | NodeBuilder node_builder(node_name, "Enter", g->op_registry()); |
| 614 | node_builder.Input({"dummy", 0, DT_FLOAT}); |
| 615 | node_builder.Attr("frame_name", frame_name); |
| 616 | node_builder.Attr("parallel_iterations", parallel_iterations); |
| 617 | Node* res_node; |
| 618 | *status = node_builder.Finalize(g, &res_node, /*consume=*/true); |
| 619 | if (!status->ok()) return nullptr; |
| 620 | res_node->set_assigned_device_name(device_name); |
| 621 | return res_node; |
| 622 | } |
| 623 | |
| 624 | // A merge node for control flow. |
| 625 | Node* AddControlMerge(const string& in_name1, const string& in_name2, Graph* g, |
no test coverage detected