| 171 | } |
| 172 | |
| 173 | Status CaseBuilder::AddInputs() { |
| 174 | // Add input data edges. |
| 175 | std::vector<const Edge*> edges; |
| 176 | TF_RETURN_IF_ERROR(case_op_->input_edges(&edges)); |
| 177 | // Start at index 1 as the first input is the branch index. |
| 178 | for (int i = 1; i < edges.size(); ++i) { |
| 179 | const Edge* e = edges[i]; |
| 180 | TF_RETURN_IF_ERROR(AddInput(e->src(), e->src_output())); |
| 181 | } |
| 182 | // Add input control edges. |
| 183 | for (const Edge* e : case_op_->in_edges()) { |
| 184 | if (e->IsControlEdge()) { |
| 185 | graph_->AddControlEdge(e->src(), control_predecessor_); |
| 186 | } |
| 187 | } |
| 188 | return Status::OK(); |
| 189 | } |
| 190 | |
| 191 | Status CaseBuilder::AddOutputs() { |
| 192 | // Construct the call nodes for each branch. |
no test coverage detected