User manual
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
653
Matrix_Multiply
Prototype
sub procedure Matrix_Multiply(dim byref src1, src2, dest as word[256], dim
numRows1, numCols2, numCols1Rows2 as 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
dim
mx1 as word[6]
mx2 as word[6]
mxDest as word[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