| 1865 | } |
| 1866 | |
| 1867 | bool ValidateConstWhileParams(const TF_WhileParams& params, TF_Status* s) { |
| 1868 | if (params.cond_graph == nullptr || params.body_graph == nullptr || |
| 1869 | params.cond_graph->parent == nullptr || |
| 1870 | params.cond_graph->parent != params.body_graph->parent || |
| 1871 | params.cond_graph->parent_inputs != params.body_graph->parent_inputs || |
| 1872 | params.ninputs <= 0 || params.cond_inputs == nullptr || |
| 1873 | params.body_inputs == nullptr || params.body_outputs == nullptr) { |
| 1874 | s->status = InvalidArgument( |
| 1875 | "TF_WhileParams must be created by successful TF_NewWhile() call"); |
| 1876 | return false; |
| 1877 | } |
| 1878 | return true; |
| 1879 | } |
| 1880 | |
| 1881 | bool ValidateInputWhileParams(const TF_WhileParams& params, TF_Status* s) { |
| 1882 | if (params.cond_output.oper == nullptr) { |
no test coverage detected