| 153 | std::string init_vaule; |
| 154 | std::string core_str; |
| 155 | MaxReducer(std::string ctype) : Rdeucer(ctype) { |
| 156 | std::string suffix_ins; |
| 157 | if (m_ctype == "float") { |
| 158 | suffix_ins = "Float32"; |
| 159 | init_vaule = "-__FLT_MAX__"; |
| 160 | } else if (m_ctype == "gi_float16_t") { |
| 161 | suffix_ins = "Float16"; |
| 162 | init_vaule = "-65504"; |
| 163 | } else { |
| 164 | CC_ABORT << "unsupported dtype for min reduce"; |
| 165 | } |
| 166 | |
| 167 | core_str = "GiMaximum" + suffix_ins; |
| 168 | } |
| 169 | std::string gen_init(bool c_remain) override { |
| 170 | if (!c_remain) |
| 171 | return simd_type + " answer_vec = " + init_str + "(" + init_vaule + ");\n"; |
nothing calls this directly
no outgoing calls
no test coverage detected