General matrix-matrix multiply

F_SGEMM/F_DGEMM/F_CGEMM/F_ZGEMM

 

INTEGER*8

K, LDA, LDB, LDC, M, N, TRANSA, TRANSB

 

REAL*4

ALPHA, BETA

 

REAL*4

A( LDA, * ), B( LDB, * ), C( LDC, * )

 

SUBROUTINE F_SGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA,

 

B, LDB, BETA, C, LDC)

 

INTEGER*8

K, LDA, LDB, LDC, M, N, TRANSA, TRANSB

 

REAL*8

ALPHA, BETA

 

REAL*8

A( LDA, * ), B( LDB, * ), C( LDC, * )

 

SUBROUTINE F_DGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA,

 

B, LDB, BETA, C, LDC)

 

INTEGER*8

K, LDA, LDB, LDC, M, N, TRANSA, TRANSB

 

COMPLEX*8

ALPHA, BETA

 

COMPLEX*8

A( LDA, * ), B( LDB, * ), C( LDC, * )

 

SUBROUTINE F_CGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA,

 

B, LDB, BETA, C, LDC)

 

INTEGER*8

K, LDA, LDB, LDC, M, N, TRANSA, TRANSB

 

COMPLEX*16

ALPHA, BETA

 

COMPLEX*16

A( LDA, * ), B( LDB, * ), C( LDC, * )

 

SUBROUTINE F_ZGEMM (TRANSA, TRANSB, M, N, K, ALPHA, A, LDA,

 

B, LDB, BETA, C, LDC)

Input

TRANS-

 

 

(A/B)

Specifies whether to apply the matrix (A or B), its

 

 

transpose (AT or BT), or its conjugate transpose

 

 

(A* or B*). Use one of the following constants:

 

 

BLAS_NO_TRANS, BLAS_TRANS,

 

 

BLAS_CONJ_TRANS

 

M

Number of rows in matrix C, m ≥ 0. If m = 0, the

 

 

subprograms do not reference A, B, or C.

 

N

Number of columns in matrix C, n ≥ 0. If n = 0, the

 

 

subprograms do not reference A, B, or C.

 

K

The middle dimension of the matrix multiply, k ≥ 0.

 

 

If k = 0, the subprograms compute C ← βC without

 

 

referencing A or B.

 

ALPHA

The scalar ALPHA. If alpha = 0, the subprograms

 

 

compute C ← βC without referencing A or B.

 

A

Array containing the matrix A, whose size is indicated

 

 

by TRANSA:

 

 

BLAS_NO_TRANS m-by-kmatrix A

Chapter 3 Basic Matrix Operations 363