These subroutines compute one of the following matrix-matrix products, using the scalars alpha and beta and matrices A, B, and C:
where matrix A is stored in either upper or lower storage mode, and:
| alpha, A, B, beta, C | Subprogram |
| Short-precision real | SSYMM |
| Long-precision real | DSYMM |
| Short-precision complex | CSYMM and CHEMM |
| Long-precision complex | ZSYMM and ZHEMM |
| Fortran | CALL SSYMM | DSYMM | CSYMM | ZSYMM | CHEMM | ZHEMM (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc) |
| C and C++ | ssymm | dsymm | csymm | zsymm | chemm | zhemm (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc); |
| PL/I | CALL SSYMM | DSYMM | CSYMM | ZSYMM | CHEMM | ZHEMM (side, uplo, m, n, alpha, a, lda, b, ldb, beta, c, ldc); |
If side = 'L', A is to the left of B, resulting in equation 1.
If side = 'R', A is to the right of B, resulting in equation 2.
Specified as: a single character. It must be 'L' or 'R'.
If uplo = 'U', A is stored in upper storage mode.
If uplo = 'L', A is stored in lower storage mode.
Specified as: a single character. It must be 'U' or 'L'.
If side = 'L', m is the order of matrix A.
Specified as: a fullword integer; 0 <= m <= ldb, m <= ldc, and:
If side = 'L', m <= lda.
If side = 'R', n is the order of matrix A.
Specified as: a fullword integer; n >= 0 and:
If side = 'R', n <= lda.
If side = 'L', A is order m.
If side = 'R', A is order n.
and where it is stored as follows:
If uplo = 'U', A is stored in upper storage mode.
If uplo = 'L', A is stored in lower storage mode.
Specified as: a two-dimensional array, containing numbers of the data type indicated in Table 77, where:
If side = 'L', its size must be lda by (at least) m.
If side = 'R', it size must be lda by (at least) n.
If side = 'L', lda >= m.
If side = 'R', lda >= n.
Returned as: an ldc by (at least) n array, containing numbers of the data type indicated in Table 77.
These subroutines can perform the following matrix-matrix product computations using matrix A, which is real symmetric for SSYMM and DSYMM, complex symmetric for CSYMM and ZSYMM, and complex Hermitian for CHEMM and ZHEMM:
where:
See references [32] and [38]. In the following two cases, no computation is performed:
Unable to allocate internal work area.
None
This example shows the computation C<--alphaAB+betaC, where A is a real symmetric matrix of order 5, stored in upper storage mode, and B and C are 5 by 4 rectangular matrices.
SIDE UPLO M N ALPHA A LDA B LDB BETA C LDC
| | | | | | | | | | | |
CALL SSYMM( 'L' , 'U' , 5 , 4 , 2.0 , A , 8 , B , 6 , 1.0 , C , 5 )
* *
| 1.0 2.0 -1.0 -1.0 4.0 |
| . 0.0 1.0 1.0 -1.0 |
| . . -1.0 1.0 2.0 |
A = | . . . 2.0 0.0 |
| . . . . -1.0 |
| . . . . . |
| . . . . . |
| . . . . . |
* *
* *
| 1.0 -1.0 0.0 2.0 |
| 2.0 2.0 -1.0 -2.0 |
B = | 1.0 0.0 -1.0 1.0 |
| -3.0 -1.0 1.0 -1.0 |
| 4.0 2.0 -1.0 1.0 |
| . . . . |
* *
* *
| 23.0 12.0 -6.0 2.0 |
| -4.0 -5.0 1.0 3.0 |
C = | 5.0 6.0 -1.0 -4.0 |
| -4.0 1.0 0.0 -5.0 |
| 8.0 -4.0 -2.0 13.0 |
* *
* *
| 69.0 36.0 -18.0 6.0 |
| -12.0 -15.0 3.0 9.0 |
C = | 15.0 18.0 -3.0 -12.0 |
| -12.0 3.0 0.0 -15.0 |
| 8.0 -20.0 -2.0 35.0 |
* *
This example shows the computation C<--alphaAB+betaC, where A is a real symmetric matrix of order 3, stored in lower storage mode, and B and C are 3 by 6 rectangular matrices.
SIDE UPLO M N ALPHA A LDA B LDB BETA C LDC
| | | | | | | | | | | |
CALL SSYMM( 'L' , 'L' , 3 , 6 , 2.0 , A , 4 , B , 3 , 2.0 , C , 5 )
* *
| 1.0 . . |
A = | 2.0 4.0 . |
| 1.0 -1.0 -1.0 |
| . . . |
* *
* *
| 1.0 -3.0 2.0 2.0 -1.0 2.0 |
B = | 2.0 4.0 0.0 0.0 1.0 -2.0 |
| 1.0 -1.0 -1.0 -1.0 -1.0 1.0 |
* *
* *
| 6.0 4.0 1.0 1.0 0.0 -1.0 |
| 9.0 11.0 5.0 5.0 3.0 -5.0 |
C = | -2.0 -6.0 3.0 3.0 -1.0 32.0 |
| . . . . . . |
| . . . . . . |
* *
* *
| 24.0 16.0 4.0 4.0 0.0 -4.0 |
| 36.0 44.0 20.0 20.0 12.0 -20.0 |
C = | -8.0 -24.0 12.0 12.0 -4.0 12.0 |
| . . . . . . |
| . . . . . . |
* *
This example shows the computation C<--alphaBA+betaC, where A is a real symmetric matrix of order 3, stored in upper storage mode, and B and C are 2 by 3 rectangular matrices.
SIDE UPLO M N ALPHA A LDA B LDB BETA C LDC
| | | | | | | | | | | |
CALL SSYMM( 'R' , 'U' , 2 , 3 , 2.0 , A , 4 , B , 3 , 1.0 , C , 5 )
* *
| 1.0 -3.0 1.0 |
A = | . 4.0 -1.0 |
| . . 2.0 |
| . . . |
* *
* *
| 1.0 -3.0 3.0 |
B = | 2.0 4.0 -1.0 |
| . . . |
* *
* *
| 13.0 -18.0 10.0 |
| -11.0 11.0 -4.0 |
C = | . . . |
| . . . |
| . . . |
* *
* *
| 39.0 -54.0 30.0 |
| -33.0 33.0 -12.0 |
C = | . . . |
| . . . |
| . . . |
* *
This example shows the computation C<--alphaBA+betaC, where A is a real symmetric matrix of order 3, stored in lower storage mode, and B and C are 3 by 3 square matrices.
SIDE UPLO M N ALPHA A LDA B LDB BETA C LDC
| | | | | | | | | | | |
CALL SSYMM( 'R' , 'L' , 3 , 3 , -1.0 , A , 3 , B , 3 , 1.0 , C , 3 )
* *
| 1.0 . . |
A = | 2.0 10.0 . |
| 1.0 11.0 4.0 |
* *
* *
| 1.0 -3.0 2.0 |
B = | 2.0 4.0 0.0 |
| 1.0 -1.0 -1.0 |
* *
* *
| 1.0 5.0 -9.0 |
C = | -3.0 10.0 -2.0 |
| -2.0 8.0 0.0 |
* *
* *
| 4.0 11.0 15.0 |
C = | -13.0 -34.0 -48.0 |
| 0.0 27.0 14.0 |
* *
This example shows the computation C<--alphaBA+betaC, where A is a complex symmetric matrix of order 3, stored in upper storage mode, and B and C are 2 by 3 rectangular matrices.
SIDE UPLO M N ALPHA A LDA B LDB BETA C LDC
| | | | | | | | | | | |
CALL CSYMM( 'R' , 'U' , 2 , 3 , ALPHA , A , 4 , B , 3 , BETA , C , 5 )
ALPHA = (2.0, 3.0) BETA = (1.0, 6.0)
* *
| (1.0, 5.0) (-3.0, 2.0) (1.0, 6.0) |
A = | . (4.0, 5.0) (-1.0, 4.0) |
| . . (2.0, 5.0) |
| . . . |
* *
* *
| (1.0, 1.0) (-3.0, 2.0) (3.0, 3.0) |
B = | (2.0, 6.0) (4.0, 5.0) (-1.0, 4.0) |
| . . . |
* *
* *
| (13.0, 6.0) (-18.0, 6.0) (10.0, 7.0) |
| (-11.0, 8.0) (11.0, 1.0) (-4.0, 2.0) |
C = | . . . |
| . . . |
| . . . |
* *
* *
| (-96.0, 72.0) (-141.0, -226.0) (-112.0, 38.0) |
| (-230.0, -269.0) (-133.0, -23.0) (-272.0, -198.0) |
C = | . . . |
| . . . |
| . . . |
* *
This example shows the computation C<--alphaBA+betaC, where A is a complex Hermitian matrix of order 3, stored in lower storage mode, and B and C are 3 by 3 square matrices.
SIDE UPLO M N ALPHA A LDA B LDB BETA C LDC
| | | | | | | | | | | |
CALL CHEMM( 'R' , 'L' , 2 , 3 , ALPHA , A , 4 , B , 3 , BETA , C , 5 )
ALPHA = (2.0, 3.0) BETA = (1.0, 6.0)
* *
| (1.0, . ) . . |
A = | (3.0, 2.0) (4.0, . ) . |
| (-1.0, 6.0) (1.0, 4.0) (2.0, . ) |
| . . . |
* *
* *
| (1.0, 1.0) (-3.0, 2.0) (3.0, 3.0) |
B = | (2.0, 6.0) (4.0, 5.0) (-1.0, 4.0) |
| . . . |
* *
* *
| (13.0, 6.0) (-18.0, 6.0) (10.0, 7.0) |
| (-11.0, 8.0) (11.0, 1.0) (-4.0, 2.0) |
C = | . . . |
| . . . |
| . . . |
* *
* *
| (-137.0, 17.0) (-158.0, -102.0) (-39.0, 141.0) |
| (-154.0, -77.0) (-63.0, 186.0) (159.0, 104.0) |
C = | . . . |
| . . . |
| . . . |
* *