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

Function quantize_qsymm16

arm_compute/core/QuantizationInfo.h:534–541  ·  view source on GitHub ↗

Quantize a value given a 16-bit symmetric quantization scheme * * @param[in] value Value to quantize * @param[in] qinfo Quantization information to use for quantizing * @param[in] rounding_policy (Optional) Rounding policy to use. Default: nearest up * * @return Quantized value */

Source from the content-addressed store, hash-verified

532 * @return Quantized value
533 */
534inline int16_t quantize_qsymm16(float value,
535 const UniformQuantizationInfo &qinfo,
536 RoundingPolicy rounding_policy = RoundingPolicy::TO_NEAREST_UP)
537{
538 int quantized = arm_compute::round(value / qinfo.scale, rounding_policy);
539 quantized = arm_compute::utility::clamp<int, int16_t>(quantized);
540 return quantized;
541}
542
543/** Dequantize a value given a 16-bit symmetric quantization scheme
544 *

Callers 11

PixelValueMethod · 0.85
configureMethod · 0.85
sub_qsymm16_neonFunction · 0.85
add_qsymm16_neonFunction · 0.85
configureMethod · 0.85
validateMethod · 0.85
configureMethod · 0.85
validateMethod · 0.85
convert_to_symmetricFunction · 0.85

Calls 2

roundFunction · 0.50
uniformMethod · 0.45

Tested by

no test coverage detected