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

◆ nrf_dsp_quantize_f32_to_i32()

void nrf_dsp_quantize_f32_to_i32 ( const flt32_t * p_input,
int32_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 INT32 vector.

Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable INT32 range[0x80000000 0x7FFFFFFF] are 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 INT32 output vector
[in]numNumber of samples in each vector