CSI-DSP
Version 1.0.0
CSI DSP Software Library
|
Functions | |
q31_t | csky_dsp_lib_vec_dot_q15 (q15_t *A, q15_t *B, uint32_t N) |
Q15 vector dot product. More... | |
q31_t | csky_dsp_lib_vec_dot_q31 (q31_t *A, q31_t *B, uint32_t N) |
Q31 vector dot product. More... | |
Compute the dot product of two vector, the computaional process is:
for(i=0; i < N; i++) { Result += (*(A+i)) * (*(B+i)); }
support for q15 and q31 format.
[in] | *A | points to the input buffer a |
[in] | *B | points to the input buffer b |
[in] | N | number of samples in each vector |
Scaling and Overflow Behavior:
32 bit arithmetic is used throughout this function. when two Q15 numbers are multiplied together, the resulting Q30 bit number is added to the Q31 accumulator. Finally, the result will be shift to left in one bit with saturation, so the output value is between[0x80000000, 0x7FFFFFFF].
[in] | *A | points to the input buffer a |
[in] | *B | points to the input buffer b |
[in] | N | number of samples in each vector |
Scaling and Overflow Behavior:
64 bit arithmetic is used throughout this function. when two Q31 numbers are multiplied together, the resulting Q62 bit number is added to the Q63 accumulator. Finally, the result will be shift to right in 31 bit with saturation, so the output value is between[0x80000000, 0x7FFFFFFF].