Dequantize an sve vector holding 16 16-bit quantized values. * * @param[in] pg Predicate value. * @param[in] qv Input values to be dequantized. * @param[in] qi Quantization information to be used in the computation. * * @return Dequantized values in an sve vector */
| 78 | * @return Dequantized values in an sve vector |
| 79 | */ |
| 80 | inline svfloat32x4_t svdequantize_z(svbool_t pg, const svint16x2_t qv, const UniformQuantizationInfo &qi) |
| 81 | { |
| 82 | const float scale = qi.scale; |
| 83 | const auto vscale = svdup_n_f32(scale); |
| 84 | const svfloat32x4_t vdequantized_input = |
| 85 | svcreate4_f32(svmul_f32_z(pg, svcvt_f32_s32_z(pg, svmovlb_s32(svget2_s16(qv, 0))), vscale), |
| 86 | svmul_f32_z(pg, svcvt_f32_s32_z(pg, svmovlt_s32(svget2_s16(qv, 0))), vscale), |
| 87 | svmul_f32_z(pg, svcvt_f32_s32_z(pg, svmovlb_s32(svget2_s16(qv, 1))), vscale), |
| 88 | svmul_f32_z(pg, svcvt_f32_s32_z(pg, svmovlt_s32(svget2_s16(qv, 1))), vscale)); |
| 89 | return vdequantized_input; |
| 90 | } |
| 91 | |
| 92 | /** Quantize an sve vector holding 16 floating point values. |
| 93 | * |
no outgoing calls
no test coverage detected