gemm(3F)
dgemm, sgemm, zgemm, cgemm - BLAS level three Matrix Product
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME dgemm, sgemm, zgemm, cgemm - BLAS level three Matrix Product FORTRAN 77 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,*) subroutine sgemm( transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc ) character*1 transa, transb integer m, n, k, lda, ldb, ldc real alpha, beta real a( lda,*), b(ldb,*), c(ldc,*) subroutine zgemm( 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 complex alpha, beta double complex a( lda,*), b(ldb,*), c(ldc,*) subroutine cgemm( transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc ) character*1 transa, transb integer m, n, k, lda, ldb, ldc complex alpha, beta complex a( lda,*), b(ldb,*), c(ldc,*) C SYNOPSIS void dgemm( transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc ) MatrixTranspose transa, transb; Integer m, n, k, lda, ldb, ldc; double alpha, beta; double (*a)[lda*ka], (*b)[lda*n], (*c)[lda*kb]; void sgemm( transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc ) MatrixTranspose transa, transb; Integer m, n, k, lda, ldb, ldc; float alpha, beta; float (*a)[lda*ka], (*b)[lda*n], (*c)[lda*kb]; void zgemm( transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc ) MatrixTranspose transa, transb; Integer m, n, k, lda, ldb, ldc; Zomplex alpha, beta; Zomplex (*a)[lda*ka], (*b)[lda*n], (*c)[lda*kb]; void cgemm( transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc ) MatrixTranspose transa, transb; Integer m, n, k, lda, ldb, ldc; Complex alpha, beta; Complex (*a)[lda*ka], (*b)[lda*n], (*c)[lda*kb]; DESCRIPTION dgemm, sgemm, zgemm and cgemm perform one of the matrix-matrix operations C := alpha*op( A )*op( B ) + beta*C, where op( X ) is one of op( X ) = X or op( X ) = X', alpha and beta are scalars, and A, B and C are matrices, with op( A ) an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. PARAMETERS transa On entry, transa specifies the form of op( A ) to be used in the matrix multiplication as follows: FORTRAN transa = 'N' or 'n', op( A ) = A. transa = 'T' or 't', op( A ) = A'. transa = 'C' or 'c', op( A ) = conjg( A'). C transa = NoTranspose op( A ) = A. transa = Transpose op( A ) = A'. transa = ConjugateTranspose op( A ) = conjg( A'). Unchanged on exit. transb On entry, transb specifies the form of op( B ) to be used in the matrix multiplication as follows: FORTRAN transb = 'N' or 'n', op( B ) = B. transb = 'T' or 't', op( B ) = B'. transb = 'C' or 'c', op( B ) = conjg( B' ). C transb = NoTranspose op( B ) = B. transb = Transpose op( B ) = B'. transb = ConjugateTranspose op( B ) = conjg( B' ). Unchanged on exit. m On entry, m specifies the number of rows of the matrix op( A ) and of the matrix C. m must be at least zero. Unchanged on exit. n On entry, n specifies the number of columns of the matrix op( B ) and the number of columns of the matrix C. n must be at least zero. Unchanged on exit. k On entry, k specifies the number of columns of the matrix op( A ) and the number of rows of the matrix op( B ). k must be at least zero. Unchanged on exit. alpha On entry, alpha specifies the scalar alpha. Unchanged on exit. a An array containing the matrix A. FORTRAN Array of dimension ( lda, ka ). C A pointer to an array of size lda*ka. See note below about array storage convention for C. ka is k when transa = 'N' or 'n' or NoTranspose and is m otherwise. Before entry with transa = 'N' or 'n' or NoTranspose, the leading m by k part of the array a must contain the matrix A, otherwise the leading k by m part of the array a must contain the matrix A. Unchanged on exit. lda On entry, lda specifies the first dimension of a as declared in the calling (sub) program. When transa = 'N' or 'n' or NoTranspose, then lda must be at least max( 1, m ), otherwise lda must be at least max( 1, k ). Unchanged on exit. b An array containing the matrix B. FORTRAN An array of dimension ( ldb, kb ). C A pointer to an array of size ldb*kb. See note below about array storage convention for C. kb is n when transb = 'N' or 'n' or NoTranspose, and is k otherwise. Before entry with transb = 'N' or 'n' or NoTranspose, the leading k by n part of the array b must contain the matrix B, otherwise the leading n by k part of the array b must contain the matrix B. Unchanged on exit. ldb On entry, ldb specifies the first dimension of b as declared in the calling (sub)program. When transb = 'N' or 'n' or NoTranspose then ldb must be at least max( 1, k ), otherwise ldb must be at least max( 1, n ). Unchanged on exit. beta On entry, beta specifies the scalar beta. When beta is supplied as zero then c need not be set on input. Unchanged on exit. c An array containing the matrix C. FORTRAN An array of dimension ( ldc, n ). C A pointer to an array of size ldc*n. See note below about array storage convention for C. Before entry, the leading m by 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. On exit, the array c is overwritten by the m by n matrix ( alpha*op( A )*op( B ) + beta*C ). ldc On entry, ldc specifies the first dimension of c as declared in the calling (sub) program. ldc must be at least max( 1, m ). Unchanged on exit. C ARRAY STORAGE CONVENTION The matrices are assumed to be stored in a one dimensional C array in an analogous fashion as a Fortran array (column major). Therefore, the element A(i+1,j) of matrix A is stored immediately after the element A(i,j), while A(i,j+1) is lda elements apart from A(i,j). The element A(i,j) of the matrix can be accessed directly by reference to a[ (j-1)*lda + (i-1) ]. AUTHORS Jack Dongarra, Argonne National Laboratory. Iain Duff, AERE Harwell. Jeremy Du Croz, Numerical Algorithms Group Ltd. Sven Hammarling, Numerical Algorithms Group Ltd. TUNING Optimized and parallelized for SGI R3000, R4x00 and R8000 platforms.