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