| 41 | } |
| 42 | namespace { |
| 43 | std::string init_declare(const std::string& src_dtype, const std::string& dst_dtype) { |
| 44 | std::string body_temp = |
| 45 | StringTemplate::StringTemplateArgs() |
| 46 | .add("simd_width", |
| 47 | (uint32_t)(16 / std::min<size_t>(Utils::get_dtype_size(src_dtype), Utils::get_dtype_size(dst_dtype)))) |
| 48 | .render(R"( |
| 49 | float scale; |
| 50 | GI_FLOAT32_t vscale; |
| 51 | const size_t SIMD_WIDTH = ${simd_width}; |
| 52 | )"); |
| 53 | return body_temp; |
| 54 | } |
| 55 | |
| 56 | std::string gen_scale(const std::string& src_dtype, const std::string& dst_dtype) { |
| 57 | std::string body_temp; |
no test coverage detected