Collaboration diagram for DSP_mul32:
void | DSP_mul32 (const int *restrict x, const int *restrict y, int *restrict r, int nx) |
void DSP_mul32 | ( | const int *restrict | x, | |
const int *restrict | y, | |||
int *restrict | r, | |||
int | nx | |||
) |
The function performs a Q.31 x Q.31 multiply and returns the upper 32 bits of the result. The result of the intermediate multiplies are accumulated into a 40-bit long register pair, as there could be potential overflow. The contribution of the multiplication of the two lower 16-bit halves are not considered. The output is in Q.30 format. Results are accurate to least significant bit.
x | = Pointer to input data vector 1 of size nx | |
y | = Pointer to input data vector 2 of size nx | |
r | = Pointer to output data vector of size nx | |
nx | = Number of elements in input and output vectors |