Trailing-Edge
-
PDP-10 Archives
-
decuslib20-02
-
decus/20-0026/madd.doc
There are 2 other files named madd.doc in the archive. Click here to see a list.
SUBROUTINE MADD
PURPOSE
ADD TWO MATRICES ELEMENT BY ELEMENT TO FORM RESULTANT
MATRIX
USAGE
CALL MADD(A,B,R,N,M,MSA,MSB)
DESCRIPTION OF PARAMETERS
A - NAME OF INPUT MATRIX
B - NAME OF INPUT MATRIX
R - NAME OF OUTPUT MATRIX
N - NUMBER OF ROWS IN A,B,R
M - NUMBER OF COLUMNS IN A,B,R
MSA - ONE DIGIT NUMBER FOR STORAGE MODE OF MATRIX A
0 - GENERAL
1 - SYMMETRIC
2 - DIAGONAL
MSB - SAME AS MSA EXCEPT FOR MATRIX B
REMARKS
NONE
SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
LOC
METHOD
STORAGE MODE OF OUTPUT MATRIX IS FIRST DETERMINED. ADDITION
OF CORRESPONDING ELEMENTS IS THEN PERFORMED.
THE FOLLOWING TABLE SHOWS THE STORAGE MODE OF THE OUTPUT
MATRIX FOR ALL COMBINATIONS OF INPUT MATRICES
A B R
GENERAL GENERAL GENERAL
GENERAL SYMMETRIC GENERAL
GENERAL DIAGONAL GENERAL
SYMMETRIC GENERAL GENERAL
SYMMETRIC SYMMETRIC SYMMETRIC
SYMMETRIC DIAGONAL SYMMETRIC
DIAGONAL GENERAL GENERAL
DIAGONAL SYMMETRIC SYMMETRIC
DIAGONAL DIAGONAL DIAGONAL