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