| 148 | } // namespace |
| 149 | |
| 150 | static std::string assign_op(const std::vector<instruction_ref>& splits) |
| 151 | { |
| 152 | static std::unordered_map<std::string, std::string> m = { |
| 153 | {"reduce_sum", "assign_add"}, |
| 154 | {"reduce_mean", "assign_add"}, |
| 155 | {"reduce_prod", "assign_mul"}, |
| 156 | {"reduce_max", "assign_max"}, |
| 157 | {"reduce_min", "assign_min"}, |
| 158 | }; |
| 159 | return m.at(splits.front()->name()); |
| 160 | } |
| 161 | |
| 162 | static std::vector<instruction_ref> |
| 163 | insert_module_inline(module& m, instruction_ref ins, const module::with_inputs& mwi) |