NAME dgemm - general matrix-matrix multiply with updating and scaling SYNOPSIS SUBROUTINE DGEMM (TRANSA, TRANSB, M, N.,K, ALPHA, A, LDA, B, LDB, BETA, C, LDC) CHARACTER*1 TRANSA, TRANSB INTEGER M, N, K, LDA, LDB, LDC DOUBLE PRECISION ALPHA, BETA DOUBLE PRECISION A(LDA, *), B(LDB, *), C(LDC, *) DESCRIPTION Performs a double precision general matrix-matrix multiplication with optional matrix updating and scaling. Compute C = ALPHA*op( A )*op( B ) + BETA*C given ALPHA and BETA are double precision scalars, and A, B and C are double precision matrices, with op( A ) an M × K matrix, op( B ) a K×N matrix and C an M × N matrix. The operation op( X ) is one of op( X ) = X or op( X ) = XT depending upon the value of the flags TRANSA or TRANSB. INPUT PARAMETERS TRANSA Character*1 Scalar Matrix A transpose flag. If TRANSA = 'N' or 'n', then A is used. If TRANSA = 'T ','t ','C' or 'c' then the transpose of A is used. TRANSB Character* 1 Scalar Matrix B transpose flag. If TRANSB = 'N' or 'n', then B is used. If TRANSB = 'T ','t ','C' or 'c' then the transpose of B is used. M Integer Scalar Number of rows of A and C. N Integer Scalar Number of columns of B and C. K Integer Scalar Number of columns of A and rows of B. ALPHA Double precision Scalar Input scalar. A Double precision Matrix Input matrix of DIMENSION (LDA, ka), where ka is K when TRANSA = 'N' or 'n', and is M otherwise. Before entry with TRANSA = 'N' or 'n', the leading M × K part of the array A must contain the matrix A, otherwise the leading K × M part of the array A must contain the matrix A. LDA Integer Scalar Leading dimension of matrix A. B Double precision Matrix Input matrix of DIMENSION (LDB, kb), where kb is N when TRANSB = 'N' or 'n', and is K otherwise. Before entry with TRANSB = 'N' or 'n', the lead- ing K × N part of the array B must contain the matrix B, otherwise the lead- ing N ×K part of the array B must contain the matrix B. LDB Integer Scalar Leading dimension of matrix B. BETA Double precision Scalar Input scalar C Double precision Matrix Input/output matrix. Before entry, the leading M ×N part of the array C must contain the matrix C, except when BETA is zero, in which case C need not be set on entry. LDC Integer Scalar Leading dimension of matrix C. OUTPUT PARAMETERS C Double precision Matrix Input/output matrix. On exit, the array C is overwritten by the M ×N matrix ALPHA*op( A )*op( B ) + BETA*C. NOTES For additional information on invoking this routine from C, see blas(3SCI) . EXAMPLE Input: TRANSA = N TRANSB = N LDA = 4 LDB = 3 LDC = 3 M = 3 N = 2 K = 3 ALPHA = 1.0 BETA = 0.0 A: 1.0 2.0 3.0 2.0 2.0 1.0 3.0 2.0 1.0 4.0 5.0 2.0 B: 1.0 0.0 2.0 1.0 0.0 2.0 Output: C: 5.0 8.0 6.0 4.0 7.0 4.0 ERRORS The routine XERBLA (see xerbla(3SCI)) is called to handle the following errors: if M,N,or K is less than zero, if LDA is nonpositive or less than the rows in A, if LDB is nonpositive or less than the rows in B, if LDC is nonpositive or less than M, if the transpose flags TRANSA and TRANSB are set incorrectly. FILES /opt/craysoft/libsci/lib/libSci.a [LibSciマニュアルより]