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

Function vquantize_signed

src/core/NEON/NEAsymm.h:645–661  ·  view source on GitHub ↗

Quantize a neon vector holding 8 floating point values. * * @param[in] qv Input values to be quantized. * @param[in] qi Quantization information to be used in the computation. * * @return A neon vector holding the singed quantized values */

Source from the content-addressed store, hash-verified

643 * @return A neon vector holding the singed quantized values
644 */
645inline int8x8_t vquantize_signed(const float32x4x2_t &qv, const UniformQuantizationInfo &qi)
646{
647 const float scale = qi.scale;
648 const int offset = qi.offset;
649 const float32x4_t voffset = vdupq_n_f32(offset);
650 const float32x4_t vinvscale = vdupq_n_f32(1.f / scale);
651 const int32x4x4_t rf = {{
652#ifdef __aarch64__
653 vcvtnq_s32_f32(vmlaq_f32(voffset, qv.val[0], vinvscale)),
654 vcvtnq_s32_f32(vmlaq_f32(voffset, qv.val[1], vinvscale)),
655#else //__aarch64__
656 vcvtq_s32_f32(vmlaq_f32(voffset, qv.val[0], vinvscale)),
657 vcvtq_s32_f32(vmlaq_f32(voffset, qv.val[1], vinvscale)),
658#endif //__aarch64__
659 }};
660 return vqmovn_s16(vcombine_s16(vqmovn_s32(rf.val[0]), vqmovn_s32(rf.val[1])));
661}
662
663inline int32x4x4_t vquantize_internal(const float32x4x4_t &qv, float scale, int32_t offset)
664{

Callers 10

vrequantize_poolingFunction · 0.85
batch_concatFunction · 0.85
run_opMethod · 0.85
run_opMethod · 0.85
vquantizeFunction · 0.85
depth_concatFunction · 0.85
elementwise_op<int8_t>Function · 0.85

Calls 1

vquantize_internalFunction · 0.85

Tested by

no test coverage detected