Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches

◆ nrf_dsp_quantize_f32_to_i8()

void nrf_dsp_quantize_f32_to_i8 ( const flt32_t * p_input,
int8_t * p_out,
uint16_t num )

#include <include/nrf_edgeai/dsp/support/nrf_dsp_quantization.h>

Quantize the elements of the floating-point vector to INT8 vector.

Scaling and Overflow Behavior:
The function uses saturating arithmetic. Results outside of the allowable INT8 range [0x80 0x7F] will be saturated.
Note
In order to apply rounding, the library should be rebuilt with the NRF_DSP_USE_MATH_ROUNDING macro
Parameters
[in]p_inputPoints to the floating-point input vector
[out]p_outPoints to the INT8 output vector
[in]numNumber of samples in input and output vector