Dequantize a neon vector holding 16 16-bit quantized values. * * @param[in] qv Input values to be dequantized. * @param[in] qi Quantization information to be used in the computation. * * @return Dequantized values in a neon vector */
| 169 | * @return Dequantized values in a neon vector |
| 170 | */ |
| 171 | inline float32x4x4_t vdequantize(const int16x8x2_t &qv, const UniformQuantizationInfo &qi) |
| 172 | { |
| 173 | const float scale = qi.scale; |
| 174 | const float32x4_t vscale = vdupq_n_f32(scale); |
| 175 | const float32x4x4_t vdequantized_input = {{ |
| 176 | vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(qv.val[0]))), vscale), |
| 177 | vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(qv.val[0]))), vscale), |
| 178 | vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(qv.val[1]))), vscale), |
| 179 | vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(qv.val[1]))), vscale), |
| 180 | }}; |
| 181 | return vdequantized_input; |
| 182 | } |
| 183 | |
| 184 | /** Quantize a neon vector holding 16 floating point values. |
| 185 | * |
no outgoing calls
no test coverage detected