# DSP_mat_mul_cplx [Matrix]

Collaboration diagram for DSP_mat_mul_cplx:

## Detailed Description

 void DSP_mat_mul_cplx (const short *restrict x, int r1, int c1, const short *restrict y, int c2, short *restrict r, int qs)

## Function Documentation

 void DSP_mat_mul_cplx ( const short *restrict x, int r1, int c1, const short *restrict y, int c2, short *restrict r, int qs )

This function computes the expression “r = x * y” for complex matrices x and y. The columnar dimension of x must match the row dimension of y. The resulting matrix has the same number of rows as x and the same number of columns as y.

The values stored in the matrices are assumed to be type _CPLX16. Each array consists of an even and odd term with even terms representing the real part of the element and the odd terms the imaginary part. All intermediate sums are retained to 32-bit precision. The results are right-shifted by a user-specified amount, and then truncated to 16 bits.

Parameters:
 x = Pointer to input matrix of size r1*c1 r1 = Number of rows in matrix x c1 = Number of columns in matrix x. Also number of rows in y y = Pointer to input matrix of size c1*c2 c2 = Number of columns in matrix y r = Pointer to output matrix of size r1*c2 qs = Final right-shift to apply to the result
Algorithm:
DSP_mat_mul_cplx.c is the natural C equivalent of the optimized intrinsic C code without restrictions. Note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
The arrays x[], y[], and r[] are stored in distinct arrays.
That is, in-place processing is not allowed.
The arrays x[], y[], and r[] are aligned on double word boundaries.
r1, c1, c2 are multiples of 2 and >= 4.
Implementation Notes:
Interruptibility : The code is interruptible.
Endian support : supports both Little and Big endian modes.