Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SSYR2K(3dxml)  —  Subroutines

Name

ssyr2k, dsyr2k, csyr2k, zsyr2k − Rank-2k update of a symmetric matrix

FORMAT

{S,D,C,Z}SYR2K ( uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc )

Arguments

uplocharacter∗1
On entry, specifies whether the upper- or lower-triangular part of the symmetric matrix C is to be referenced:

If uplo = ’U’ or ’u’, the upper-triangular part of C is to be referenced. 

If uplo = ’L’ or ’l’, the lower-triangular part of C is to be referenced. 
On exit, uplo is unchanged. 

transcharacter∗1
On entry, specifies the operation to be performed:

If trans = ’N’ or ’n’, C  =  alpha ∗ A∗transp(B) + alpha ∗ B∗transp(A) + beta∗C

If trans = ’T’ or ’t’, C  =  alpha ∗ transp(A)∗B + alpha ∗ transp(B)A + beta∗C
On exit, trans is unchanged. 

ninteger∗4
On entry, the order n of the matrix C; n >= 0
On exit, n is unchanged. 

kinteger∗4
On entry,  the number of columns of the matrices A and B when trans = ’N’ or the number of rows of the matrix A and B when trans = ’T’ or k >= 0. 
On exit, k is unchanged. 

alphareal∗4 | real∗8 | complex∗8 | complex∗16
On entry, specifies the scalar alpha.
On exit, alpha is unchanged. 

areal∗4 | real∗8 | complex∗8 | complex∗16
On entry, a two-dimensional array A with dimensions lda by ka.
For trans = ’N’ or ka >= k and the leading n by k portion of the array A contains the matrix A. 
For trans = ’T’ or ka >= n and the leading k by n part of the array A contains the matrix A. 
On exit, a is unchanged. 

ldainteger∗4
On entry, the first dimension of array A.
For trans = ’N’ or ’n’ lda >= MAX(1,n). 
For trans = ’T’ or lda >= MAX(1,k). 
On exit, lda is unchanged. 

breal∗4 | real∗8 | complex∗8 | complex∗16
On entry, a two-dimensional array B with dimensions ldb by kb.
For trans = ’N’ or kb >= k and the leading n by k portion of the array B contains the matrix B. 
For trans = ’T’ or kb >= n and the leading k by n part of the array B contains the matrix B. 
On exit, b is unchanged. 

ldbinteger∗4
On entry, the first dimension of array B.
For trans = ’N’ or ldb >= MAX(1,n). 
For trans = ’T’ or ldb >= MAX(1,k). 
On exit, ldb is unchanged. 

betareal∗4 | real∗8 | complex∗8 | complex∗16
On entry, specifies the scalar beta.
On exit, beta is unchanged. 

creal∗4 | real∗8 | complex∗8 | complex∗16
On entry, a two-dimensional array C of dimensions ldc by at least n.

If uplo specifies the upper part, the leading n by n upper-triangular part of the array C must contain the upper-triangular part of the symmetric matrix C, and the strictly lower-triangular part of C is not referenced. 

If uplo specifies the lower part, the leading n by n lower-triangular part of the array C must contain the lower-triangular part of the symmetric matrix C, and the strictly upper-triangular part of C is not referenced. 
On exit, c is overwritten; the triangular part of the array C is overwritten by the triangular part of the updated matrix. 

ldcinteger∗4
On entry, the first dimension  of array C; ldc >= MAX(1,n)
On exit, ldc is unchanged. 

Description

The _SYR2K routines perform the rank-2k update of a symmetric matrix: C  = alpha ∗ A∗transp(B) + alpha ∗ B∗transp(A)
 + beta∗C C  = alpha ∗ transp(A)∗B + alpha ∗ transp(B)A
 + beta∗C
alpha and beta are scalars,  C is an n by n symmetric matrix, and A and B are n by k matrices in the first case and k by n matrices in the second case.

Example

REAL∗4 A(40,10), B(40,10), C(20,20), alpha, beta
LDA = 40
LDB = 30
LDC = 20
N = 18
K = 10
alpha = 1.0
beta = 2.0
CALL SSYR2K (’U’,’N’,N,K,alpha,A,LDA,B,LDB,beta,C,LDC)

This FORTRAN code computes the rank-2k update of the real symmetric matrix C: C  =  alpha ∗ A∗transp(B) + alpha ∗ B∗transp(A) + beta∗C. Only the upper-triangular part of C is referenced. The leading 18 by 10 part of array A contains the matrix A. The leading 18 by 10 part of array B contains the matrix B. The leading 18 by 18 upper-triangular part of array C contains the upper-triangular matrix C.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026