| 330 | } |
| 331 | |
| 332 | bool instruction::is_undefined() const |
| 333 | { |
| 334 | if(op.name() == "undefined" or |
| 335 | (op.name() == "@literal" and this->get_literal().get_shape().elements() == 0)) |
| 336 | { |
| 337 | return true; |
| 338 | } |
| 339 | else if(this->inputs().empty()) |
| 340 | { |
| 341 | return false; |
| 342 | } |
| 343 | else |
| 344 | { |
| 345 | return std::all_of(this->inputs().begin(), this->inputs().end(), [](auto arg) { |
| 346 | return all_of(instruction::get_output_alias(arg), |
| 347 | [](auto alias) { return alias->is_undefined(); }); |
| 348 | }); |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | bool instruction::can_eval() const |
| 353 | { |
no test coverage detected