1SSYR2K(1) BLAS routine SSYR2K(1)
2
3
4
6 SSYR2K - performs one of the symmetric rank 2k operations C :=
7 alpha*A*B' + alpha*B*A' + beta*C,
8
10 SUBROUTINE SSYR2K(UPLO,TRANS,N,K,ALPHA,A,LDA,B,LDB,BETA,C,LDC)
11
12 REAL ALPHA,BETA
13
14 INTEGER K,LDA,LDB,LDC,N
15
16 CHARACTER TRANS,UPLO
17
18 REAL A(LDA,*),B(LDB,*),C(LDC,*)
19
21 SSYR2K performs one of the symmetric rank 2k operations
22
23 or
24
25 C := alpha*A'*B + alpha*B'*A + beta*C,
26
27 where alpha and beta are scalars, C is an n by n symmetric matrix
28 and A and B are n by k matrices in the first case and k by n
29 matrices in the second case.
30
31
33 UPLO - CHARACTER*1.
34 On entry, UPLO specifies whether the upper or lower
35 triangular part of the array C is to be referenced as
36 follows:
37
38 UPLO = 'U' or 'u' Only the upper triangular part of C is to
39 be referenced.
40
41 UPLO = 'L' or 'l' Only the lower triangular part of C is to
42 be referenced.
43
44 Unchanged on exit.
45
46 TRANS - CHARACTER*1.
47 On entry, TRANS specifies the operation to be performed as
48 follows:
49
50 TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' + beta*C.
51
52 TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A + beta*C.
53
54 TRANS = 'C' or 'c' C := alpha*A'*B + alpha*B'*A + beta*C.
55
56 Unchanged on exit.
57
58 N - INTEGER.
59 On entry, N specifies the order of the matrix C. N must be at
60 least zero. Unchanged on exit.
61
62 K - INTEGER.
63 On entry with TRANS = 'N' or 'n', K specifies the number of
64 columns of the matrices A and B, and on entry with TRANS =
65 'T' or 't' or 'C' or 'c', K specifies the number of rows of
66 the matrices A and B. K must be at least zero. Unchanged on
67 exit.
68
69 ALPHA - REAL .
70 On entry, ALPHA specifies the scalar alpha. Unchanged on exit.
71
72 A - REAL array of DIMENSION ( LDA, ka ), where ka is
73 k when TRANS = 'N' or 'n', and is n otherwise. Before
74 entry with TRANS = 'N' or 'n', the leading n by k part of
75 the array A must contain the matrix A, otherwise the leading
76 k by n part of the array A must contain the matrix A.
77 Unchanged on exit.
78
79 LDA - INTEGER.
80 On entry, LDA specifies the first dimension of A as declared in
81 the calling (sub) program. When TRANS = 'N' or 'n' then
82 LDA must be at least max( 1, n ), otherwise LDA must be at
83 least max( 1, k ). Unchanged on exit.
84
85 B - REAL array of DIMENSION ( LDB, kb ), where kb is
86 k when TRANS = 'N' or 'n', and is n otherwise. Before
87 entry with TRANS = 'N' or 'n', the leading n by k part of
88 the array B must contain the matrix B, otherwise the leading
89 k by n part of the array B must contain the matrix B.
90 Unchanged on exit.
91
92 LDB - INTEGER.
93 On entry, LDB specifies the first dimension of B as declared in
94 the calling (sub) program. When TRANS = 'N' or 'n' then
95 LDB must be at least max( 1, n ), otherwise LDB must be at
96 least max( 1, k ). Unchanged on exit.
97
98 BETA - REAL .
99 On entry, BETA specifies the scalar beta. Unchanged on exit.
100
101 C - REAL array of DIMENSION ( LDC, n ).
102 Before entry with UPLO = 'U' or 'u', the leading n by n
103 upper triangular part of the array C must contain the upper tri‐
104 angular part of the symmetric matrix and the strictly lower
105 triangular part of C is not referenced. On exit, the upper tri‐
106 angular part of the array C is overwritten by the upper trian‐
107 gular part of the updated matrix. Before entry with UPLO =
108 'L' or 'l', the leading n by n lower triangular part of the
109 array C must contain the lower triangular part of the symmet‐
110 ric matrix and the strictly upper triangular part of C is not
111 referenced. On exit, the lower triangular part of the array C
112 is overwritten by the lower triangular part of the updated
113 matrix.
114
115 LDC - INTEGER.
116 On entry, LDC specifies the first dimension of C as declared in
117 the calling (sub) program. LDC must be at least max( 1,
118 n ). Unchanged on exit.
119
121 Level 3 Blas routine.
122
123
124 -- Written on 8-February-1989.
125 Jack Dongarra, Argonne National Laboratory.
126 Iain Duff, AERE Harwell.
127 Jeremy Du Croz, Numerical Algorithms Group Ltd.
128 Sven Hammarling, Numerical Algorithms Group Ltd.
129
130
131
132
133BLAS routine November 2008 SSYR2K(1)