| 696 | } |
| 697 | |
| 698 | std::unordered_map<std::string, shape> module::get_parameter_shapes() const |
| 699 | { |
| 700 | std::unordered_map<std::string, shape> result; |
| 701 | for(auto&& ins : impl->instructions) |
| 702 | { |
| 703 | if(ins.name() == "@param") |
| 704 | { |
| 705 | auto&& name = any_cast<builtin::param>(ins.get_operator()).parameter; |
| 706 | result[name] = ins.get_shape(); |
| 707 | } |
| 708 | } |
| 709 | return result; |
| 710 | } |
| 711 | |
| 712 | bool module::has_instruction(instruction_ref ins) const { return impl->contains(ins); } |
| 713 |