User manual

mikroC PRO for dsPIC
MikroElektronika
687
Matrix_Multiply
Prototype
void Matrix_Multiply(unsigned *src1, unsigned *src2, unsigned *dest, unsigned
numRows1, unsigned numCols2, unsigned numCols1Rows2);
Description Function does matrix multiplication.
with:
i ϵ [0, numRows1-1]
j ϵ [0, numCols2-1]
k ϵ [0, numCols1Rows2-1]
Parameters
- src1: pointer to the rst matrix
- src2: pointer to the second matrix
- dest: pointer to result matrix
- numRows1: number of rows in the rst matrix
- numCols2: number of columns in the second matrix
- numCols1Rows2: number of columns in the rst matrix and rows in the second matrix
Returns Nothing.
Requires Nothing.
Example
int mx1[6] = {1,2,3,4,5,6} ;
int mx2[6] = {2,2,2,2,2,2} ;
int mxDest[9];
Matrix_Multiply(mx1,mx2,mxDest,2,2,3);
Notes - [W0..W7] used, not restored
- [W8..W13] used, and restored
- AccuA used, not restored
- CORCON saved, used, restored