MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / svdequantize_z

Function svdequantize_z

src/core/NEON/SVESymm.h:80–90  ·  view source on GitHub ↗

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 */

Source from the content-addressed store, hash-verified

78 * @return Dequantized values in an sve vector
79 */
80inline 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 *

Calls

no outgoing calls

Tested by

no test coverage detected