| 635 | } |
| 636 | |
| 637 | std::vector<std::string> module::get_parameter_names() const |
| 638 | { |
| 639 | std::vector<std::string> result; |
| 640 | std::vector<builtin::param> params; |
| 641 | for(auto&& ins : impl->instructions) |
| 642 | { |
| 643 | if(ins.name() == "@param") |
| 644 | { |
| 645 | auto&& param = any_cast<builtin::param>(ins.get_operator()); |
| 646 | params.push_back(param); |
| 647 | } |
| 648 | } |
| 649 | std::stable_sort( |
| 650 | params.begin(), params.end(), by(std::less<>{}, [](auto&& p) { return p.order; })); |
| 651 | std::transform(params.begin(), params.end(), std::back_inserter(result), [&](auto&& p) { |
| 652 | return p.parameter; |
| 653 | }); |
| 654 | return result; |
| 655 | } |
| 656 | |
| 657 | instruction_ref module::get_parameter(std::string name) const |
| 658 | { |