[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


SSYRK, DSYRK, CSYRK, or ZSYRK Subroutine

Purpose

Perform symmetric rank k operations.

Library

BLAS Library (libblas.a)

FORTRAN Syntax


SUBROUTINE SSYRK(UPLO, TRANS, N, K, ALPHA,
A, LDA, BETA, C, LDC)
CHARACTER*1 UPLO, TRANS
INTEGER N, K, LDA, LDC
REAL ALPHA, BETA
REAL A(LDA,*), C(LDC,*)

SUBROUTINE DSYRK(UPLO, TRANS, N, K, ALPHA,
A, LDA, BETA, C, LDC)
CHARACTER*1 UPLO,TRANS
INTEGER N,K,LDA,LDC
DOUBLE PRECISION ALPHA,BETA
DOUBLE PRECISION A(LDA,*), C(LDC,*)

SUBROUTINE CSYRK(UPLO, TRANS, N, K, ALPHA,
A, LDA, BETA, C, LDC)
CHARACTER*1 UPLO,TRANS
INTEGER N,K,LDA,LDC
COMPLEX ALPHA,BETA
COMPLEX A(LDA,*), C(LDC,*)

SUBROUTINE ZSYRK(UPLO, TRANS, N, K, ALPHA,
A, LDA, BETA, C, LDC)
CHARACTER*1 UPLO,TRANS
INTEGER N,K,LDA,LDC
COMPLEX*16 ALPHA,BETA
COMPLEX*16 A(LDA,*), C(LDC,*)

Description

The SSYRK, DSYRK, CSYRK or ZSYRK subroutine performs one of the symmetric rank k operations:

C := alpha * A * A' + beta * C

OR

C := alpha * A' * A + beta * C

where alpha and beta are scalars, C is an N by N symmetric matrix, and A is an N by K matrix in the first case and a K by N matrix in the second case.

Parameters


UPLO On entry, UPLO specifies whether the upper or lower triangular part of the array C is to be referenced as follows:

UPLO = 'U' or 'u'
Only the upper triangular part of C is to be referenced.

UPLO = 'L' or 'l'
Only the lower triangular part of C is to be referenced.

Unchanged on exit.

TRANS On entry, TRANS specifies the operation to be performed as follows:

TRANS = 'N' or 'n'
C := alpha * A * A' + beta * C

TRANS = 'T' or 't'
C := alpha * A' * A + beta * C

TRANS = 'C' or 'c'
C := alpha * A' * A + beta * C

Unchanged on exit.

N On entry, N specifies the order of the matrix C; N must be at least 0; unchanged on exit.
K On entry with TRANS = 'N' or 'n', K specifies the number of columns of the matrix A, and on entry with TRANS = 'T' or 't' or 'C' or 'c', K specifies the number of rows of the matrix A; K must be at least 0; unchanged on exit.
ALPHA On entry, ALPHA specifies the scalar alpha; unchanged on exit.
A An array of dimension ( LDA, KA ), where KA is K when TRANS = 'N' or 'n', and is N otherwise; on entry with TRANS = 'N' or 'n', the leading N by K part of the array A must contain the matrix A, otherwise the leading K by N 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 TRANS = 'N' or 'n', LDA must be at least max( 1, N ); otherwise LDA must be at least max( 1, K ); unchanged on exit.
BETA On entry, BETA specifies the scalar beta; unchanged on exit.
C An array of dimension ( LDC, N ); on entry with UPLO = 'U' or 'u', the leading N by N upper triangular part of the array C must contain the upper triangular part of the symmetric matrix and the strictly lower triangular part of C is not referenced; on exit, the upper triangular part of the array C is overwritten by the upper triangular part of the updated matrix; on entry with UPLO = 'L' or 'l', the leading N by N lower triangular part of the array C must contain the lower triangular part of the symmetric matrix and the strictly upper triangular part of C is not referenced; on exit, the lower triangular part of the array C is overwritten by the lower triangular part of the updated matrix.
LDC On entry, LDC specifies the first dimension of C as declared in the calling (sub) program; LDC must be at least max( 1, N ); unchanged on exit.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]