User manual
mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
652
Matrix_Multiply
Prototype
procedure Matrix_Multiply(var src1, src2, dest: array[256] of word; numRows1,
numCols2, numCols1Rows2: word);
Description Function does matrix multiplication.
with:
i є [0, numRows1-1]
j є [0, numCols2-1]
k є [0, numCols1Rows2-1]
Parameters - src1: rst matrix
- src2: second matrix
- dest: 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
var
mx1 : array[6] of word;
mx2 : array[6] of word;
mxDest : array[9] of word;
...
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