| 1 |
/* ./src_f77/chemm.f -- translated by f2c (version 20030320). |
| 2 |
You must link the resulting object file with the libraries: |
| 3 |
-lf2c -lm (in that order) |
| 4 |
*/ |
| 5 |
|
| 6 |
#include <punc/vf2c.h> |
| 7 |
|
| 8 |
/* Subroutine */ int chemm_(char *side, char *uplo, integer *m, integer *n, |
| 9 |
realcomplex *alpha, realcomplex *a, integer *lda, realcomplex *b, integer *ldb, |
| 10 |
realcomplex *beta, realcomplex *c__, integer *ldc, ftnlen side_len, ftnlen |
| 11 |
uplo_len) |
| 12 |
{ |
| 13 |
/* System generated locals */ |
| 14 |
integer a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset, i__1, i__2, |
| 15 |
i__3, i__4, i__5, i__6; |
| 16 |
real r__1; |
| 17 |
realcomplex q__1, q__2, q__3, q__4, q__5; |
| 18 |
|
| 19 |
/* Builtin functions */ |
| 20 |
void r_cnjg(realcomplex *, realcomplex *); |
| 21 |
|
| 22 |
/* Local variables */ |
| 23 |
static integer i__, j, k, info; |
| 24 |
static realcomplex temp1, temp2; |
| 25 |
extern logical lsame_(char *, char *, ftnlen, ftnlen); |
| 26 |
static integer nrowa; |
| 27 |
static logical upper; |
| 28 |
extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen); |
| 29 |
|
| 30 |
/* .. Scalar Arguments .. */ |
| 31 |
/* .. Array Arguments .. */ |
| 32 |
/* .. */ |
| 33 |
|
| 34 |
/* Purpose */ |
| 35 |
/* ======= */ |
| 36 |
|
| 37 |
/* CHEMM performs one of the matrix-matrix operations */ |
| 38 |
|
| 39 |
/* C := alpha*A*B + beta*C, */ |
| 40 |
|
| 41 |
/* or */ |
| 42 |
|
| 43 |
/* C := alpha*B*A + beta*C, */ |
| 44 |
|
| 45 |
/* where alpha and beta are scalars, A is an hermitian matrix and B and */ |
| 46 |
/* C are m by n matrices. */ |
| 47 |
|
| 48 |
/* Parameters */ |
| 49 |
/* ========== */ |
| 50 |
|
| 51 |
/* SIDE - CHARACTER*1. */ |
| 52 |
/* On entry, SIDE specifies whether the hermitian matrix A */ |
| 53 |
/* appears on the left or right in the operation as follows: */ |
| 54 |
|
| 55 |
/* SIDE = 'L' or 'l' C := alpha*A*B + beta*C, */ |
| 56 |
|
| 57 |
/* SIDE = 'R' or 'r' C := alpha*B*A + beta*C, */ |
| 58 |
|
| 59 |
/* Unchanged on exit. */ |
| 60 |
|
| 61 |
/* UPLO - CHARACTER*1. */ |
| 62 |
/* On entry, UPLO specifies whether the upper or lower */ |
| 63 |
/* triangular part of the hermitian matrix A is to be */ |
| 64 |
/* referenced as follows: */ |
| 65 |
|
| 66 |
/* UPLO = 'U' or 'u' Only the upper triangular part of the */ |
| 67 |
/* hermitian matrix is to be referenced. */ |
| 68 |
|
| 69 |
/* UPLO = 'L' or 'l' Only the lower triangular part of the */ |
| 70 |
/* hermitian matrix is to be referenced. */ |
| 71 |
|
| 72 |
/* Unchanged on exit. */ |
| 73 |
|
| 74 |
/* M - INTEGER. */ |
| 75 |
/* On entry, M specifies the number of rows of the matrix C. */ |
| 76 |
/* M must be at least zero. */ |
| 77 |
/* Unchanged on exit. */ |
| 78 |
|
| 79 |
/* N - INTEGER. */ |
| 80 |
/* On entry, N specifies the number of columns of the matrix C. */ |
| 81 |
/* N must be at least zero. */ |
| 82 |
/* Unchanged on exit. */ |
| 83 |
|
| 84 |
/* ALPHA - COMPLEX . */ |
| 85 |
/* On entry, ALPHA specifies the scalar alpha. */ |
| 86 |
/* Unchanged on exit. */ |
| 87 |
|
| 88 |
/* A - COMPLEX array of DIMENSION ( LDA, ka ), where ka is */ |
| 89 |
/* m when SIDE = 'L' or 'l' and is n otherwise. */ |
| 90 |
/* Before entry with SIDE = 'L' or 'l', the m by m part of */ |
| 91 |
/* the array A must contain the hermitian matrix, such that */ |
| 92 |
/* when UPLO = 'U' or 'u', the leading m by m upper triangular */ |
| 93 |
/* part of the array A must contain the upper triangular part */ |
| 94 |
/* of the hermitian matrix and the strictly lower triangular */ |
| 95 |
/* part of A is not referenced, and when UPLO = 'L' or 'l', */ |
| 96 |
/* the leading m by m lower triangular part of the array A */ |
| 97 |
/* must contain the lower triangular part of the hermitian */ |
| 98 |
/* matrix and the strictly upper triangular part of A is not */ |
| 99 |
/* referenced. */ |
| 100 |
/* Before entry with SIDE = 'R' or 'r', the n by n part of */ |
| 101 |
/* the array A must contain the hermitian matrix, such that */ |
| 102 |
/* when UPLO = 'U' or 'u', the leading n by n upper triangular */ |
| 103 |
/* part of the array A must contain the upper triangular part */ |
| 104 |
/* of the hermitian matrix and the strictly lower triangular */ |
| 105 |
/* part of A is not referenced, and when UPLO = 'L' or 'l', */ |
| 106 |
/* the leading n by n lower triangular part of the array A */ |
| 107 |
/* must contain the lower triangular part of the hermitian */ |
| 108 |
/* matrix and the strictly upper triangular part of A is not */ |
| 109 |
/* referenced. */ |
| 110 |
/* Note that the imaginary parts of the diagonal elements need */ |
| 111 |
/* not be set, they are assumed to be zero. */ |
| 112 |
/* Unchanged on exit. */ |
| 113 |
|
| 114 |
/* LDA - INTEGER. */ |
| 115 |
/* On entry, LDA specifies the first dimension of A as declared */ |
| 116 |
/* in the calling (sub) program. When SIDE = 'L' or 'l' then */ |
| 117 |
/* LDA must be at least max( 1, m ), otherwise LDA must be at */ |
| 118 |
/* least max( 1, n ). */ |
| 119 |
/* Unchanged on exit. */ |
| 120 |
|
| 121 |
/* B - COMPLEX array of DIMENSION ( LDB, n ). */ |
| 122 |
/* Before entry, the leading m by n part of the array B must */ |
| 123 |
/* contain the matrix B. */ |
| 124 |
/* Unchanged on exit. */ |
| 125 |
|
| 126 |
/* LDB - INTEGER. */ |
| 127 |
/* On entry, LDB specifies the first dimension of B as declared */ |
| 128 |
/* in the calling (sub) program. LDB must be at least */ |
| 129 |
/* max( 1, m ). */ |
| 130 |
/* Unchanged on exit. */ |
| 131 |
|
| 132 |
/* BETA - COMPLEX . */ |
| 133 |
/* On entry, BETA specifies the scalar beta. When BETA is */ |
| 134 |
/* supplied as zero then C need not be set on input. */ |
| 135 |
/* Unchanged on exit. */ |
| 136 |
|
| 137 |
/* C - COMPLEX array of DIMENSION ( LDC, n ). */ |
| 138 |
/* Before entry, the leading m by n part of the array C must */ |
| 139 |
/* contain the matrix C, except when beta is zero, in which */ |
| 140 |
/* case C need not be set on entry. */ |
| 141 |
/* On exit, the array C is overwritten by the m by n updated */ |
| 142 |
/* matrix. */ |
| 143 |
|
| 144 |
/* LDC - INTEGER. */ |
| 145 |
/* On entry, LDC specifies the first dimension of C as declared */ |
| 146 |
/* in the calling (sub) program. LDC must be at least */ |
| 147 |
/* max( 1, m ). */ |
| 148 |
/* Unchanged on exit. */ |
| 149 |
|
| 150 |
|
| 151 |
/* Level 3 Blas routine. */ |
| 152 |
|
| 153 |
/* -- Written on 8-February-1989. */ |
| 154 |
/* Jack Dongarra, Argonne National Laboratory. */ |
| 155 |
/* Iain Duff, AERE Harwell. */ |
| 156 |
/* Jeremy Du Croz, Numerical Algorithms Group Ltd. */ |
| 157 |
/* Sven Hammarling, Numerical Algorithms Group Ltd. */ |
| 158 |
|
| 159 |
|
| 160 |
/* .. External Functions .. */ |
| 161 |
/* .. External Subroutines .. */ |
| 162 |
/* .. Intrinsic Functions .. */ |
| 163 |
/* .. Local Scalars .. */ |
| 164 |
/* .. Parameters .. */ |
| 165 |
/* .. */ |
| 166 |
/* .. Executable Statements .. */ |
| 167 |
|
| 168 |
/* Set NROWA as the number of rows of A. */ |
| 169 |
|
| 170 |
/* Parameter adjustments */ |
| 171 |
a_dim1 = *lda; |
| 172 |
a_offset = 1 + a_dim1; |
| 173 |
a -= a_offset; |
| 174 |
b_dim1 = *ldb; |
| 175 |
b_offset = 1 + b_dim1; |
| 176 |
b -= b_offset; |
| 177 |
c_dim1 = *ldc; |
| 178 |
c_offset = 1 + c_dim1; |
| 179 |
c__ -= c_offset; |
| 180 |
|
| 181 |
/* Function Body */ |
| 182 |
if (lsame_(side, "L", (ftnlen)1, (ftnlen)1)) { |
| 183 |
nrowa = *m; |
| 184 |
} else { |
| 185 |
nrowa = *n; |
| 186 |
} |
| 187 |
upper = lsame_(uplo, "U", (ftnlen)1, (ftnlen)1); |
| 188 |
|
| 189 |
/* Test the input parameters. */ |
| 190 |
|
| 191 |
info = 0; |
| 192 |
if (! lsame_(side, "L", (ftnlen)1, (ftnlen)1) && ! lsame_(side, "R", ( |
| 193 |
ftnlen)1, (ftnlen)1)) { |
| 194 |
info = 1; |
| 195 |
} else if (! upper && ! lsame_(uplo, "L", (ftnlen)1, (ftnlen)1)) { |
| 196 |
info = 2; |
| 197 |
} else if (*m < 0) { |
| 198 |
info = 3; |
| 199 |
} else if (*n < 0) { |
| 200 |
info = 4; |
| 201 |
} else if (*lda < max(1,nrowa)) { |
| 202 |
info = 7; |
| 203 |
} else if (*ldb < max(1,*m)) { |
| 204 |
info = 9; |
| 205 |
} else if (*ldc < max(1,*m)) { |
| 206 |
info = 12; |
| 207 |
} |
| 208 |
if (info != 0) { |
| 209 |
xerbla_("CHEMM ", &info, (ftnlen)6); |
| 210 |
return 0; |
| 211 |
} |
| 212 |
|
| 213 |
/* Quick return if possible. */ |
| 214 |
|
| 215 |
if (*m == 0 || *n == 0 || alpha->r == 0.f && alpha->i == 0.f && (beta->r |
| 216 |
== 1.f && beta->i == 0.f)) { |
| 217 |
return 0; |
| 218 |
} |
| 219 |
|
| 220 |
/* And when alpha.eq.zero. */ |
| 221 |
|
| 222 |
if (alpha->r == 0.f && alpha->i == 0.f) { |
| 223 |
if (beta->r == 0.f && beta->i == 0.f) { |
| 224 |
i__1 = *n; |
| 225 |
for (j = 1; j <= i__1; ++j) { |
| 226 |
i__2 = *m; |
| 227 |
for (i__ = 1; i__ <= i__2; ++i__) { |
| 228 |
i__3 = i__ + j * c_dim1; |
| 229 |
c__[i__3].r = 0.f, c__[i__3].i = 0.f; |
| 230 |
/* L10: */ |
| 231 |
} |
| 232 |
/* L20: */ |
| 233 |
} |
| 234 |
} else { |
| 235 |
i__1 = *n; |
| 236 |
for (j = 1; j <= i__1; ++j) { |
| 237 |
i__2 = *m; |
| 238 |
for (i__ = 1; i__ <= i__2; ++i__) { |
| 239 |
i__3 = i__ + j * c_dim1; |
| 240 |
i__4 = i__ + j * c_dim1; |
| 241 |
q__1.r = beta->r * c__[i__4].r - beta->i * c__[i__4].i, |
| 242 |
q__1.i = beta->r * c__[i__4].i + beta->i * c__[ |
| 243 |
i__4].r; |
| 244 |
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i; |
| 245 |
/* L30: */ |
| 246 |
} |
| 247 |
/* L40: */ |
| 248 |
} |
| 249 |
} |
| 250 |
return 0; |
| 251 |
} |
| 252 |
|
| 253 |
/* Start the operations. */ |
| 254 |
|
| 255 |
if (lsame_(side, "L", (ftnlen)1, (ftnlen)1)) { |
| 256 |
|
| 257 |
/* Form C := alpha*A*B + beta*C. */ |
| 258 |
|
| 259 |
if (upper) { |
| 260 |
i__1 = *n; |
| 261 |
for (j = 1; j <= i__1; ++j) { |
| 262 |
i__2 = *m; |
| 263 |
for (i__ = 1; i__ <= i__2; ++i__) { |
| 264 |
i__3 = i__ + j * b_dim1; |
| 265 |
q__1.r = alpha->r * b[i__3].r - alpha->i * b[i__3].i, |
| 266 |
q__1.i = alpha->r * b[i__3].i + alpha->i * b[i__3] |
| 267 |
.r; |
| 268 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 269 |
temp2.r = 0.f, temp2.i = 0.f; |
| 270 |
i__3 = i__ - 1; |
| 271 |
for (k = 1; k <= i__3; ++k) { |
| 272 |
i__4 = k + j * c_dim1; |
| 273 |
i__5 = k + j * c_dim1; |
| 274 |
i__6 = k + i__ * a_dim1; |
| 275 |
q__2.r = temp1.r * a[i__6].r - temp1.i * a[i__6].i, |
| 276 |
q__2.i = temp1.r * a[i__6].i + temp1.i * a[ |
| 277 |
i__6].r; |
| 278 |
q__1.r = c__[i__5].r + q__2.r, q__1.i = c__[i__5].i + |
| 279 |
q__2.i; |
| 280 |
c__[i__4].r = q__1.r, c__[i__4].i = q__1.i; |
| 281 |
i__4 = k + j * b_dim1; |
| 282 |
r_cnjg(&q__3, &a[k + i__ * a_dim1]); |
| 283 |
q__2.r = b[i__4].r * q__3.r - b[i__4].i * q__3.i, |
| 284 |
q__2.i = b[i__4].r * q__3.i + b[i__4].i * |
| 285 |
q__3.r; |
| 286 |
q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i; |
| 287 |
temp2.r = q__1.r, temp2.i = q__1.i; |
| 288 |
/* L50: */ |
| 289 |
} |
| 290 |
if (beta->r == 0.f && beta->i == 0.f) { |
| 291 |
i__3 = i__ + j * c_dim1; |
| 292 |
i__4 = i__ + i__ * a_dim1; |
| 293 |
r__1 = a[i__4].r; |
| 294 |
q__2.r = r__1 * temp1.r, q__2.i = r__1 * temp1.i; |
| 295 |
q__3.r = alpha->r * temp2.r - alpha->i * temp2.i, |
| 296 |
q__3.i = alpha->r * temp2.i + alpha->i * |
| 297 |
temp2.r; |
| 298 |
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i; |
| 299 |
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i; |
| 300 |
} else { |
| 301 |
i__3 = i__ + j * c_dim1; |
| 302 |
i__4 = i__ + j * c_dim1; |
| 303 |
q__3.r = beta->r * c__[i__4].r - beta->i * c__[i__4] |
| 304 |
.i, q__3.i = beta->r * c__[i__4].i + beta->i * |
| 305 |
c__[i__4].r; |
| 306 |
i__5 = i__ + i__ * a_dim1; |
| 307 |
r__1 = a[i__5].r; |
| 308 |
q__4.r = r__1 * temp1.r, q__4.i = r__1 * temp1.i; |
| 309 |
q__2.r = q__3.r + q__4.r, q__2.i = q__3.i + q__4.i; |
| 310 |
q__5.r = alpha->r * temp2.r - alpha->i * temp2.i, |
| 311 |
q__5.i = alpha->r * temp2.i + alpha->i * |
| 312 |
temp2.r; |
| 313 |
q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i; |
| 314 |
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i; |
| 315 |
} |
| 316 |
/* L60: */ |
| 317 |
} |
| 318 |
/* L70: */ |
| 319 |
} |
| 320 |
} else { |
| 321 |
i__1 = *n; |
| 322 |
for (j = 1; j <= i__1; ++j) { |
| 323 |
for (i__ = *m; i__ >= 1; --i__) { |
| 324 |
i__2 = i__ + j * b_dim1; |
| 325 |
q__1.r = alpha->r * b[i__2].r - alpha->i * b[i__2].i, |
| 326 |
q__1.i = alpha->r * b[i__2].i + alpha->i * b[i__2] |
| 327 |
.r; |
| 328 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 329 |
temp2.r = 0.f, temp2.i = 0.f; |
| 330 |
i__2 = *m; |
| 331 |
for (k = i__ + 1; k <= i__2; ++k) { |
| 332 |
i__3 = k + j * c_dim1; |
| 333 |
i__4 = k + j * c_dim1; |
| 334 |
i__5 = k + i__ * a_dim1; |
| 335 |
q__2.r = temp1.r * a[i__5].r - temp1.i * a[i__5].i, |
| 336 |
q__2.i = temp1.r * a[i__5].i + temp1.i * a[ |
| 337 |
i__5].r; |
| 338 |
q__1.r = c__[i__4].r + q__2.r, q__1.i = c__[i__4].i + |
| 339 |
q__2.i; |
| 340 |
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i; |
| 341 |
i__3 = k + j * b_dim1; |
| 342 |
r_cnjg(&q__3, &a[k + i__ * a_dim1]); |
| 343 |
q__2.r = b[i__3].r * q__3.r - b[i__3].i * q__3.i, |
| 344 |
q__2.i = b[i__3].r * q__3.i + b[i__3].i * |
| 345 |
q__3.r; |
| 346 |
q__1.r = temp2.r + q__2.r, q__1.i = temp2.i + q__2.i; |
| 347 |
temp2.r = q__1.r, temp2.i = q__1.i; |
| 348 |
/* L80: */ |
| 349 |
} |
| 350 |
if (beta->r == 0.f && beta->i == 0.f) { |
| 351 |
i__2 = i__ + j * c_dim1; |
| 352 |
i__3 = i__ + i__ * a_dim1; |
| 353 |
r__1 = a[i__3].r; |
| 354 |
q__2.r = r__1 * temp1.r, q__2.i = r__1 * temp1.i; |
| 355 |
q__3.r = alpha->r * temp2.r - alpha->i * temp2.i, |
| 356 |
q__3.i = alpha->r * temp2.i + alpha->i * |
| 357 |
temp2.r; |
| 358 |
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i; |
| 359 |
c__[i__2].r = q__1.r, c__[i__2].i = q__1.i; |
| 360 |
} else { |
| 361 |
i__2 = i__ + j * c_dim1; |
| 362 |
i__3 = i__ + j * c_dim1; |
| 363 |
q__3.r = beta->r * c__[i__3].r - beta->i * c__[i__3] |
| 364 |
.i, q__3.i = beta->r * c__[i__3].i + beta->i * |
| 365 |
c__[i__3].r; |
| 366 |
i__4 = i__ + i__ * a_dim1; |
| 367 |
r__1 = a[i__4].r; |
| 368 |
q__4.r = r__1 * temp1.r, q__4.i = r__1 * temp1.i; |
| 369 |
q__2.r = q__3.r + q__4.r, q__2.i = q__3.i + q__4.i; |
| 370 |
q__5.r = alpha->r * temp2.r - alpha->i * temp2.i, |
| 371 |
q__5.i = alpha->r * temp2.i + alpha->i * |
| 372 |
temp2.r; |
| 373 |
q__1.r = q__2.r + q__5.r, q__1.i = q__2.i + q__5.i; |
| 374 |
c__[i__2].r = q__1.r, c__[i__2].i = q__1.i; |
| 375 |
} |
| 376 |
/* L90: */ |
| 377 |
} |
| 378 |
/* L100: */ |
| 379 |
} |
| 380 |
} |
| 381 |
} else { |
| 382 |
|
| 383 |
/* Form C := alpha*B*A + beta*C. */ |
| 384 |
|
| 385 |
i__1 = *n; |
| 386 |
for (j = 1; j <= i__1; ++j) { |
| 387 |
i__2 = j + j * a_dim1; |
| 388 |
r__1 = a[i__2].r; |
| 389 |
q__1.r = r__1 * alpha->r, q__1.i = r__1 * alpha->i; |
| 390 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 391 |
if (beta->r == 0.f && beta->i == 0.f) { |
| 392 |
i__2 = *m; |
| 393 |
for (i__ = 1; i__ <= i__2; ++i__) { |
| 394 |
i__3 = i__ + j * c_dim1; |
| 395 |
i__4 = i__ + j * b_dim1; |
| 396 |
q__1.r = temp1.r * b[i__4].r - temp1.i * b[i__4].i, |
| 397 |
q__1.i = temp1.r * b[i__4].i + temp1.i * b[i__4] |
| 398 |
.r; |
| 399 |
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i; |
| 400 |
/* L110: */ |
| 401 |
} |
| 402 |
} else { |
| 403 |
i__2 = *m; |
| 404 |
for (i__ = 1; i__ <= i__2; ++i__) { |
| 405 |
i__3 = i__ + j * c_dim1; |
| 406 |
i__4 = i__ + j * c_dim1; |
| 407 |
q__2.r = beta->r * c__[i__4].r - beta->i * c__[i__4].i, |
| 408 |
q__2.i = beta->r * c__[i__4].i + beta->i * c__[ |
| 409 |
i__4].r; |
| 410 |
i__5 = i__ + j * b_dim1; |
| 411 |
q__3.r = temp1.r * b[i__5].r - temp1.i * b[i__5].i, |
| 412 |
q__3.i = temp1.r * b[i__5].i + temp1.i * b[i__5] |
| 413 |
.r; |
| 414 |
q__1.r = q__2.r + q__3.r, q__1.i = q__2.i + q__3.i; |
| 415 |
c__[i__3].r = q__1.r, c__[i__3].i = q__1.i; |
| 416 |
/* L120: */ |
| 417 |
} |
| 418 |
} |
| 419 |
i__2 = j - 1; |
| 420 |
for (k = 1; k <= i__2; ++k) { |
| 421 |
if (upper) { |
| 422 |
i__3 = k + j * a_dim1; |
| 423 |
q__1.r = alpha->r * a[i__3].r - alpha->i * a[i__3].i, |
| 424 |
q__1.i = alpha->r * a[i__3].i + alpha->i * a[i__3] |
| 425 |
.r; |
| 426 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 427 |
} else { |
| 428 |
r_cnjg(&q__2, &a[j + k * a_dim1]); |
| 429 |
q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i = |
| 430 |
alpha->r * q__2.i + alpha->i * q__2.r; |
| 431 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 432 |
} |
| 433 |
i__3 = *m; |
| 434 |
for (i__ = 1; i__ <= i__3; ++i__) { |
| 435 |
i__4 = i__ + j * c_dim1; |
| 436 |
i__5 = i__ + j * c_dim1; |
| 437 |
i__6 = i__ + k * b_dim1; |
| 438 |
q__2.r = temp1.r * b[i__6].r - temp1.i * b[i__6].i, |
| 439 |
q__2.i = temp1.r * b[i__6].i + temp1.i * b[i__6] |
| 440 |
.r; |
| 441 |
q__1.r = c__[i__5].r + q__2.r, q__1.i = c__[i__5].i + |
| 442 |
q__2.i; |
| 443 |
c__[i__4].r = q__1.r, c__[i__4].i = q__1.i; |
| 444 |
/* L130: */ |
| 445 |
} |
| 446 |
/* L140: */ |
| 447 |
} |
| 448 |
i__2 = *n; |
| 449 |
for (k = j + 1; k <= i__2; ++k) { |
| 450 |
if (upper) { |
| 451 |
r_cnjg(&q__2, &a[j + k * a_dim1]); |
| 452 |
q__1.r = alpha->r * q__2.r - alpha->i * q__2.i, q__1.i = |
| 453 |
alpha->r * q__2.i + alpha->i * q__2.r; |
| 454 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 455 |
} else { |
| 456 |
i__3 = k + j * a_dim1; |
| 457 |
q__1.r = alpha->r * a[i__3].r - alpha->i * a[i__3].i, |
| 458 |
q__1.i = alpha->r * a[i__3].i + alpha->i * a[i__3] |
| 459 |
.r; |
| 460 |
temp1.r = q__1.r, temp1.i = q__1.i; |
| 461 |
} |
| 462 |
i__3 = *m; |
| 463 |
for (i__ = 1; i__ <= i__3; ++i__) { |
| 464 |
i__4 = i__ + j * c_dim1; |
| 465 |
i__5 = i__ + j * c_dim1; |
| 466 |
i__6 = i__ + k * b_dim1; |
| 467 |
q__2.r = temp1.r * b[i__6].r - temp1.i * b[i__6].i, |
| 468 |
q__2.i = temp1.r * b[i__6].i + temp1.i * b[i__6] |
| 469 |
.r; |
| 470 |
q__1.r = c__[i__5].r + q__2.r, q__1.i = c__[i__5].i + |
| 471 |
q__2.i; |
| 472 |
c__[i__4].r = q__1.r, c__[i__4].i = q__1.i; |
| 473 |
/* L150: */ |
| 474 |
} |
| 475 |
/* L160: */ |
| 476 |
} |
| 477 |
/* L170: */ |
| 478 |
} |
| 479 |
} |
| 480 |
|
| 481 |
return 0; |
| 482 |
|
| 483 |
/* End of CHEMM . */ |
| 484 |
|
| 485 |
} /* chemm_ */ |
| 486 |
|