Quantize a value given a 8-bit symmetric quantization scheme * * @param[in] value Value to quantize * @param[in] qinfo Quantization information to use for quantizing * * @return Quantized value */
| 397 | * @return Quantized value |
| 398 | */ |
| 399 | inline int8_t quantize_qsymm8(float value, const QuantizationInfo &qinfo) |
| 400 | { |
| 401 | int quantized = arm_compute::round(value / qinfo.uniform().scale, RoundingPolicy::TO_NEAREST_UP); |
| 402 | quantized = std::max(-128, std::min(quantized, 127)); |
| 403 | return quantized; |
| 404 | } |
| 405 | |
| 406 | /** Quantize a value given a 8-bit symmetric per channel quantization scheme |
| 407 | * |
no test coverage detected