CSI-DSP  Version 1.0.0
CSI DSP Software Library
Functions

Functions

q63_t csky_dsp_lib_vec_sum16 (q15_t *A, uint32_t N)
 Q15 vector summation. More...
 
q63_t csky_dsp_lib_vec_sum31 (q31_t *A, uint32_t N)
 Q31 vector summation. More...
 

Description

Compute the summation of all the elements of the Vector, the computaional process is:

for(i = 0; i < N; i++)
{
  result += *(A+i);
}

support for q15 and q31 format.

Function Documentation

q63_t csky_dsp_lib_vec_sum16 ( q15_t A,
uint32_t  N 
)
Parameters
[in]*Apoints to the input buffer
[in]Nnumber of samples in each vector
Returns
the summation result

Scaling and Overflow Behavior:

The function is realized by multiply-accumulate instruction, and the accumulator used here is Q63 format, so, there is enough guard bits. And the out put is in Q63 format.
q63_t csky_dsp_lib_vec_sum31 ( q31_t A,
uint32_t  N 
)
Parameters
[in]*Apoints to the input buffer
[in]Nnumber of samples in each vector
Returns
the summation result

Scaling and Overflow Behavior:

The function is realized by multiply-accumulate instruction, and the accumulator used here is Q63 format, so, there is enough guard bits. And the out put is in Q63 format.