zsyr2k.c 16 KB

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