GEMM - general matrix multiplication
This procedure computes the general matrix multiplication C = AB, where A, B, C are matrices.
Usage
The GEMMA stored procedure has the following syntax:
- GEMMA(matrixA,transposeA,matrixB,transposeB,matrixC)
- Parameters
- matrixA
- The name of the input matrix A.
- transposeA
- Specifies whether matrix A should be transposed for multiplication.
- matrixB
- The name of the input matrix B.
- transposeB
- Specifies whether matrix B should be transposed for multiplication.
- matrixC
- The name of the output matrix C.
Examples
CALL nzm..shape('1,2,3,4,5,0,6,7,8', 3, 3, 'A');
CALL nzm..shape('2,2,2,3,3,3,4,4,4', 3, 3,'B');
CALL nzm..gemm('A', FALSE,'B', TRUE,'C');
CALL nzm..print('C');
CALL nzm..delete_matrix('A');
CALL nzm..delete_matrix('B');
CALL nzm..delete_matrix('C');
SHAPE
-------
t
(1 row)
SHAPE
-------
t
(1 row)
GEMM
------
t
(1 row)
PRINT
--------------------------------------------------
-- matrix: C --
12, 18, 24
18, 27, 36
42, 63, 84
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)
DELETE_MATRIX
---------------
t
(1 row)