dlasd2.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610
  1. /* dlasd2.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. /* Table of constant values */
  14. static integer c__1 = 1;
  15. static doublereal c_b30 = 0.;
  16. /* Subroutine */ int _starpu_dlasd2_(integer *nl, integer *nr, integer *sqre, integer
  17. *k, doublereal *d__, doublereal *z__, doublereal *alpha, doublereal *
  18. beta, doublereal *u, integer *ldu, doublereal *vt, integer *ldvt,
  19. doublereal *dsigma, doublereal *u2, integer *ldu2, doublereal *vt2,
  20. integer *ldvt2, integer *idxp, integer *idx, integer *idxc, integer *
  21. idxq, integer *coltyp, integer *info)
  22. {
  23. /* System generated locals */
  24. integer u_dim1, u_offset, u2_dim1, u2_offset, vt_dim1, vt_offset,
  25. vt2_dim1, vt2_offset, i__1;
  26. doublereal d__1, d__2;
  27. /* Local variables */
  28. doublereal c__;
  29. integer i__, j, m, n;
  30. doublereal s;
  31. integer k2;
  32. doublereal z1;
  33. integer ct, jp;
  34. doublereal eps, tau, tol;
  35. integer psm[4], nlp1, nlp2, idxi, idxj;
  36. extern /* Subroutine */ int _starpu_drot_(integer *, doublereal *, integer *,
  37. doublereal *, integer *, doublereal *, doublereal *);
  38. integer ctot[4], idxjp;
  39. extern /* Subroutine */ int _starpu_dcopy_(integer *, doublereal *, integer *,
  40. doublereal *, integer *);
  41. integer jprev;
  42. extern doublereal _starpu_dlapy2_(doublereal *, doublereal *), _starpu_dlamch_(char *);
  43. extern /* Subroutine */ int _starpu_dlamrg_(integer *, integer *, doublereal *,
  44. integer *, integer *, integer *), _starpu_dlacpy_(char *, integer *,
  45. integer *, doublereal *, integer *, doublereal *, integer *), _starpu_dlaset_(char *, integer *, integer *, doublereal *,
  46. doublereal *, doublereal *, integer *), _starpu_xerbla_(char *,
  47. integer *);
  48. doublereal hlftol;
  49. /* -- LAPACK auxiliary routine (version 3.2) -- */
  50. /* Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
  51. /* November 2006 */
  52. /* .. Scalar Arguments .. */
  53. /* .. */
  54. /* .. Array Arguments .. */
  55. /* .. */
  56. /* Purpose */
  57. /* ======= */
  58. /* DLASD2 merges the two sets of singular values together into a single */
  59. /* sorted set. Then it tries to deflate the size of the problem. */
  60. /* There are two ways in which deflation can occur: when two or more */
  61. /* singular values are close together or if there is a tiny entry in the */
  62. /* Z vector. For each such occurrence the order of the related secular */
  63. /* equation problem is reduced by one. */
  64. /* DLASD2 is called from DLASD1. */
  65. /* Arguments */
  66. /* ========= */
  67. /* NL (input) INTEGER */
  68. /* The row dimension of the upper block. NL >= 1. */
  69. /* NR (input) INTEGER */
  70. /* The row dimension of the lower block. NR >= 1. */
  71. /* SQRE (input) INTEGER */
  72. /* = 0: the lower block is an NR-by-NR square matrix. */
  73. /* = 1: the lower block is an NR-by-(NR+1) rectangular matrix. */
  74. /* The bidiagonal matrix has N = NL + NR + 1 rows and */
  75. /* M = N + SQRE >= N columns. */
  76. /* K (output) INTEGER */
  77. /* Contains the dimension of the non-deflated matrix, */
  78. /* This is the order of the related secular equation. 1 <= K <=N. */
  79. /* D (input/output) DOUBLE PRECISION array, dimension(N) */
  80. /* On entry D contains the singular values of the two submatrices */
  81. /* to be combined. On exit D contains the trailing (N-K) updated */
  82. /* singular values (those which were deflated) sorted into */
  83. /* increasing order. */
  84. /* Z (output) DOUBLE PRECISION array, dimension(N) */
  85. /* On exit Z contains the updating row vector in the secular */
  86. /* equation. */
  87. /* ALPHA (input) DOUBLE PRECISION */
  88. /* Contains the diagonal element associated with the added row. */
  89. /* BETA (input) DOUBLE PRECISION */
  90. /* Contains the off-diagonal element associated with the added */
  91. /* row. */
  92. /* U (input/output) DOUBLE PRECISION array, dimension(LDU,N) */
  93. /* On entry U contains the left singular vectors of two */
  94. /* submatrices in the two square blocks with corners at (1,1), */
  95. /* (NL, NL), and (NL+2, NL+2), (N,N). */
  96. /* On exit U contains the trailing (N-K) updated left singular */
  97. /* vectors (those which were deflated) in its last N-K columns. */
  98. /* LDU (input) INTEGER */
  99. /* The leading dimension of the array U. LDU >= N. */
  100. /* VT (input/output) DOUBLE PRECISION array, dimension(LDVT,M) */
  101. /* On entry VT' contains the right singular vectors of two */
  102. /* submatrices in the two square blocks with corners at (1,1), */
  103. /* (NL+1, NL+1), and (NL+2, NL+2), (M,M). */
  104. /* On exit VT' contains the trailing (N-K) updated right singular */
  105. /* vectors (those which were deflated) in its last N-K columns. */
  106. /* In case SQRE =1, the last row of VT spans the right null */
  107. /* space. */
  108. /* LDVT (input) INTEGER */
  109. /* The leading dimension of the array VT. LDVT >= M. */
  110. /* DSIGMA (output) DOUBLE PRECISION array, dimension (N) */
  111. /* Contains a copy of the diagonal elements (K-1 singular values */
  112. /* and one zero) in the secular equation. */
  113. /* U2 (output) DOUBLE PRECISION array, dimension(LDU2,N) */
  114. /* Contains a copy of the first K-1 left singular vectors which */
  115. /* will be used by DLASD3 in a matrix multiply (DGEMM) to solve */
  116. /* for the new left singular vectors. U2 is arranged into four */
  117. /* blocks. The first block contains a column with 1 at NL+1 and */
  118. /* zero everywhere else; the second block contains non-zero */
  119. /* entries only at and above NL; the third contains non-zero */
  120. /* entries only below NL+1; and the fourth is dense. */
  121. /* LDU2 (input) INTEGER */
  122. /* The leading dimension of the array U2. LDU2 >= N. */
  123. /* VT2 (output) DOUBLE PRECISION array, dimension(LDVT2,N) */
  124. /* VT2' contains a copy of the first K right singular vectors */
  125. /* which will be used by DLASD3 in a matrix multiply (DGEMM) to */
  126. /* solve for the new right singular vectors. VT2 is arranged into */
  127. /* three blocks. The first block contains a row that corresponds */
  128. /* to the special 0 diagonal element in SIGMA; the second block */
  129. /* contains non-zeros only at and before NL +1; the third block */
  130. /* contains non-zeros only at and after NL +2. */
  131. /* LDVT2 (input) INTEGER */
  132. /* The leading dimension of the array VT2. LDVT2 >= M. */
  133. /* IDXP (workspace) INTEGER array dimension(N) */
  134. /* This will contain the permutation used to place deflated */
  135. /* values of D at the end of the array. On output IDXP(2:K) */
  136. /* points to the nondeflated D-values and IDXP(K+1:N) */
  137. /* points to the deflated singular values. */
  138. /* IDX (workspace) INTEGER array dimension(N) */
  139. /* This will contain the permutation used to sort the contents of */
  140. /* D into ascending order. */
  141. /* IDXC (output) INTEGER array dimension(N) */
  142. /* This will contain the permutation used to arrange the columns */
  143. /* of the deflated U matrix into three groups: the first group */
  144. /* contains non-zero entries only at and above NL, the second */
  145. /* contains non-zero entries only below NL+2, and the third is */
  146. /* dense. */
  147. /* IDXQ (input/output) INTEGER array dimension(N) */
  148. /* This contains the permutation which separately sorts the two */
  149. /* sub-problems in D into ascending order. Note that entries in */
  150. /* the first hlaf of this permutation must first be moved one */
  151. /* position backward; and entries in the second half */
  152. /* must first have NL+1 added to their values. */
  153. /* COLTYP (workspace/output) INTEGER array dimension(N) */
  154. /* As workspace, this will contain a label which will indicate */
  155. /* which of the following types a column in the U2 matrix or a */
  156. /* row in the VT2 matrix is: */
  157. /* 1 : non-zero in the upper half only */
  158. /* 2 : non-zero in the lower half only */
  159. /* 3 : dense */
  160. /* 4 : deflated */
  161. /* On exit, it is an array of dimension 4, with COLTYP(I) being */
  162. /* the dimension of the I-th type columns. */
  163. /* INFO (output) INTEGER */
  164. /* = 0: successful exit. */
  165. /* < 0: if INFO = -i, the i-th argument had an illegal value. */
  166. /* Further Details */
  167. /* =============== */
  168. /* Based on contributions by */
  169. /* Ming Gu and Huan Ren, Computer Science Division, University of */
  170. /* California at Berkeley, USA */
  171. /* ===================================================================== */
  172. /* .. Parameters .. */
  173. /* .. */
  174. /* .. Local Arrays .. */
  175. /* .. */
  176. /* .. Local Scalars .. */
  177. /* .. */
  178. /* .. External Functions .. */
  179. /* .. */
  180. /* .. External Subroutines .. */
  181. /* .. */
  182. /* .. Intrinsic Functions .. */
  183. /* .. */
  184. /* .. Executable Statements .. */
  185. /* Test the input parameters. */
  186. /* Parameter adjustments */
  187. --d__;
  188. --z__;
  189. u_dim1 = *ldu;
  190. u_offset = 1 + u_dim1;
  191. u -= u_offset;
  192. vt_dim1 = *ldvt;
  193. vt_offset = 1 + vt_dim1;
  194. vt -= vt_offset;
  195. --dsigma;
  196. u2_dim1 = *ldu2;
  197. u2_offset = 1 + u2_dim1;
  198. u2 -= u2_offset;
  199. vt2_dim1 = *ldvt2;
  200. vt2_offset = 1 + vt2_dim1;
  201. vt2 -= vt2_offset;
  202. --idxp;
  203. --idx;
  204. --idxc;
  205. --idxq;
  206. --coltyp;
  207. /* Function Body */
  208. *info = 0;
  209. if (*nl < 1) {
  210. *info = -1;
  211. } else if (*nr < 1) {
  212. *info = -2;
  213. } else if (*sqre != 1 && *sqre != 0) {
  214. *info = -3;
  215. }
  216. n = *nl + *nr + 1;
  217. m = n + *sqre;
  218. if (*ldu < n) {
  219. *info = -10;
  220. } else if (*ldvt < m) {
  221. *info = -12;
  222. } else if (*ldu2 < n) {
  223. *info = -15;
  224. } else if (*ldvt2 < m) {
  225. *info = -17;
  226. }
  227. if (*info != 0) {
  228. i__1 = -(*info);
  229. _starpu_xerbla_("DLASD2", &i__1);
  230. return 0;
  231. }
  232. nlp1 = *nl + 1;
  233. nlp2 = *nl + 2;
  234. /* Generate the first part of the vector Z; and move the singular */
  235. /* values in the first part of D one position backward. */
  236. z1 = *alpha * vt[nlp1 + nlp1 * vt_dim1];
  237. z__[1] = z1;
  238. for (i__ = *nl; i__ >= 1; --i__) {
  239. z__[i__ + 1] = *alpha * vt[i__ + nlp1 * vt_dim1];
  240. d__[i__ + 1] = d__[i__];
  241. idxq[i__ + 1] = idxq[i__] + 1;
  242. /* L10: */
  243. }
  244. /* Generate the second part of the vector Z. */
  245. i__1 = m;
  246. for (i__ = nlp2; i__ <= i__1; ++i__) {
  247. z__[i__] = *beta * vt[i__ + nlp2 * vt_dim1];
  248. /* L20: */
  249. }
  250. /* Initialize some reference arrays. */
  251. i__1 = nlp1;
  252. for (i__ = 2; i__ <= i__1; ++i__) {
  253. coltyp[i__] = 1;
  254. /* L30: */
  255. }
  256. i__1 = n;
  257. for (i__ = nlp2; i__ <= i__1; ++i__) {
  258. coltyp[i__] = 2;
  259. /* L40: */
  260. }
  261. /* Sort the singular values into increasing order */
  262. i__1 = n;
  263. for (i__ = nlp2; i__ <= i__1; ++i__) {
  264. idxq[i__] += nlp1;
  265. /* L50: */
  266. }
  267. /* DSIGMA, IDXC, IDXC, and the first column of U2 */
  268. /* are used as storage space. */
  269. i__1 = n;
  270. for (i__ = 2; i__ <= i__1; ++i__) {
  271. dsigma[i__] = d__[idxq[i__]];
  272. u2[i__ + u2_dim1] = z__[idxq[i__]];
  273. idxc[i__] = coltyp[idxq[i__]];
  274. /* L60: */
  275. }
  276. _starpu_dlamrg_(nl, nr, &dsigma[2], &c__1, &c__1, &idx[2]);
  277. i__1 = n;
  278. for (i__ = 2; i__ <= i__1; ++i__) {
  279. idxi = idx[i__] + 1;
  280. d__[i__] = dsigma[idxi];
  281. z__[i__] = u2[idxi + u2_dim1];
  282. coltyp[i__] = idxc[idxi];
  283. /* L70: */
  284. }
  285. /* Calculate the allowable deflation tolerance */
  286. eps = _starpu_dlamch_("Epsilon");
  287. /* Computing MAX */
  288. d__1 = abs(*alpha), d__2 = abs(*beta);
  289. tol = max(d__1,d__2);
  290. /* Computing MAX */
  291. d__2 = (d__1 = d__[n], abs(d__1));
  292. tol = eps * 8. * max(d__2,tol);
  293. /* There are 2 kinds of deflation -- first a value in the z-vector */
  294. /* is small, second two (or more) singular values are very close */
  295. /* together (their difference is small). */
  296. /* If the value in the z-vector is small, we simply permute the */
  297. /* array so that the corresponding singular value is moved to the */
  298. /* end. */
  299. /* If two values in the D-vector are close, we perform a two-sided */
  300. /* rotation designed to make one of the corresponding z-vector */
  301. /* entries zero, and then permute the array so that the deflated */
  302. /* singular value is moved to the end. */
  303. /* If there are multiple singular values then the problem deflates. */
  304. /* Here the number of equal singular values are found. As each equal */
  305. /* singular value is found, an elementary reflector is computed to */
  306. /* rotate the corresponding singular subspace so that the */
  307. /* corresponding components of Z are zero in this new basis. */
  308. *k = 1;
  309. k2 = n + 1;
  310. i__1 = n;
  311. for (j = 2; j <= i__1; ++j) {
  312. if ((d__1 = z__[j], abs(d__1)) <= tol) {
  313. /* Deflate due to small z component. */
  314. --k2;
  315. idxp[k2] = j;
  316. coltyp[j] = 4;
  317. if (j == n) {
  318. goto L120;
  319. }
  320. } else {
  321. jprev = j;
  322. goto L90;
  323. }
  324. /* L80: */
  325. }
  326. L90:
  327. j = jprev;
  328. L100:
  329. ++j;
  330. if (j > n) {
  331. goto L110;
  332. }
  333. if ((d__1 = z__[j], abs(d__1)) <= tol) {
  334. /* Deflate due to small z component. */
  335. --k2;
  336. idxp[k2] = j;
  337. coltyp[j] = 4;
  338. } else {
  339. /* Check if singular values are close enough to allow deflation. */
  340. if ((d__1 = d__[j] - d__[jprev], abs(d__1)) <= tol) {
  341. /* Deflation is possible. */
  342. s = z__[jprev];
  343. c__ = z__[j];
  344. /* Find sqrt(a**2+b**2) without overflow or */
  345. /* destructive underflow. */
  346. tau = _starpu_dlapy2_(&c__, &s);
  347. c__ /= tau;
  348. s = -s / tau;
  349. z__[j] = tau;
  350. z__[jprev] = 0.;
  351. /* Apply back the Givens rotation to the left and right */
  352. /* singular vector matrices. */
  353. idxjp = idxq[idx[jprev] + 1];
  354. idxj = idxq[idx[j] + 1];
  355. if (idxjp <= nlp1) {
  356. --idxjp;
  357. }
  358. if (idxj <= nlp1) {
  359. --idxj;
  360. }
  361. _starpu_drot_(&n, &u[idxjp * u_dim1 + 1], &c__1, &u[idxj * u_dim1 + 1], &
  362. c__1, &c__, &s);
  363. _starpu_drot_(&m, &vt[idxjp + vt_dim1], ldvt, &vt[idxj + vt_dim1], ldvt, &
  364. c__, &s);
  365. if (coltyp[j] != coltyp[jprev]) {
  366. coltyp[j] = 3;
  367. }
  368. coltyp[jprev] = 4;
  369. --k2;
  370. idxp[k2] = jprev;
  371. jprev = j;
  372. } else {
  373. ++(*k);
  374. u2[*k + u2_dim1] = z__[jprev];
  375. dsigma[*k] = d__[jprev];
  376. idxp[*k] = jprev;
  377. jprev = j;
  378. }
  379. }
  380. goto L100;
  381. L110:
  382. /* Record the last singular value. */
  383. ++(*k);
  384. u2[*k + u2_dim1] = z__[jprev];
  385. dsigma[*k] = d__[jprev];
  386. idxp[*k] = jprev;
  387. L120:
  388. /* Count up the total number of the various types of columns, then */
  389. /* form a permutation which positions the four column types into */
  390. /* four groups of uniform structure (although one or more of these */
  391. /* groups may be empty). */
  392. for (j = 1; j <= 4; ++j) {
  393. ctot[j - 1] = 0;
  394. /* L130: */
  395. }
  396. i__1 = n;
  397. for (j = 2; j <= i__1; ++j) {
  398. ct = coltyp[j];
  399. ++ctot[ct - 1];
  400. /* L140: */
  401. }
  402. /* PSM(*) = Position in SubMatrix (of types 1 through 4) */
  403. psm[0] = 2;
  404. psm[1] = ctot[0] + 2;
  405. psm[2] = psm[1] + ctot[1];
  406. psm[3] = psm[2] + ctot[2];
  407. /* Fill out the IDXC array so that the permutation which it induces */
  408. /* will place all type-1 columns first, all type-2 columns next, */
  409. /* then all type-3's, and finally all type-4's, starting from the */
  410. /* second column. This applies similarly to the rows of VT. */
  411. i__1 = n;
  412. for (j = 2; j <= i__1; ++j) {
  413. jp = idxp[j];
  414. ct = coltyp[jp];
  415. idxc[psm[ct - 1]] = j;
  416. ++psm[ct - 1];
  417. /* L150: */
  418. }
  419. /* Sort the singular values and corresponding singular vectors into */
  420. /* DSIGMA, U2, and VT2 respectively. The singular values/vectors */
  421. /* which were not deflated go into the first K slots of DSIGMA, U2, */
  422. /* and VT2 respectively, while those which were deflated go into the */
  423. /* last N - K slots, except that the first column/row will be treated */
  424. /* separately. */
  425. i__1 = n;
  426. for (j = 2; j <= i__1; ++j) {
  427. jp = idxp[j];
  428. dsigma[j] = d__[jp];
  429. idxj = idxq[idx[idxp[idxc[j]]] + 1];
  430. if (idxj <= nlp1) {
  431. --idxj;
  432. }
  433. _starpu_dcopy_(&n, &u[idxj * u_dim1 + 1], &c__1, &u2[j * u2_dim1 + 1], &c__1);
  434. _starpu_dcopy_(&m, &vt[idxj + vt_dim1], ldvt, &vt2[j + vt2_dim1], ldvt2);
  435. /* L160: */
  436. }
  437. /* Determine DSIGMA(1), DSIGMA(2) and Z(1) */
  438. dsigma[1] = 0.;
  439. hlftol = tol / 2.;
  440. if (abs(dsigma[2]) <= hlftol) {
  441. dsigma[2] = hlftol;
  442. }
  443. if (m > n) {
  444. z__[1] = _starpu_dlapy2_(&z1, &z__[m]);
  445. if (z__[1] <= tol) {
  446. c__ = 1.;
  447. s = 0.;
  448. z__[1] = tol;
  449. } else {
  450. c__ = z1 / z__[1];
  451. s = z__[m] / z__[1];
  452. }
  453. } else {
  454. if (abs(z1) <= tol) {
  455. z__[1] = tol;
  456. } else {
  457. z__[1] = z1;
  458. }
  459. }
  460. /* Move the rest of the updating row to Z. */
  461. i__1 = *k - 1;
  462. _starpu_dcopy_(&i__1, &u2[u2_dim1 + 2], &c__1, &z__[2], &c__1);
  463. /* Determine the first column of U2, the first row of VT2 and the */
  464. /* last row of VT. */
  465. _starpu_dlaset_("A", &n, &c__1, &c_b30, &c_b30, &u2[u2_offset], ldu2);
  466. u2[nlp1 + u2_dim1] = 1.;
  467. if (m > n) {
  468. i__1 = nlp1;
  469. for (i__ = 1; i__ <= i__1; ++i__) {
  470. vt[m + i__ * vt_dim1] = -s * vt[nlp1 + i__ * vt_dim1];
  471. vt2[i__ * vt2_dim1 + 1] = c__ * vt[nlp1 + i__ * vt_dim1];
  472. /* L170: */
  473. }
  474. i__1 = m;
  475. for (i__ = nlp2; i__ <= i__1; ++i__) {
  476. vt2[i__ * vt2_dim1 + 1] = s * vt[m + i__ * vt_dim1];
  477. vt[m + i__ * vt_dim1] = c__ * vt[m + i__ * vt_dim1];
  478. /* L180: */
  479. }
  480. } else {
  481. _starpu_dcopy_(&m, &vt[nlp1 + vt_dim1], ldvt, &vt2[vt2_dim1 + 1], ldvt2);
  482. }
  483. if (m > n) {
  484. _starpu_dcopy_(&m, &vt[m + vt_dim1], ldvt, &vt2[m + vt2_dim1], ldvt2);
  485. }
  486. /* The deflated singular values and their corresponding vectors go */
  487. /* into the back of D, U, and V respectively. */
  488. if (n > *k) {
  489. i__1 = n - *k;
  490. _starpu_dcopy_(&i__1, &dsigma[*k + 1], &c__1, &d__[*k + 1], &c__1);
  491. i__1 = n - *k;
  492. _starpu_dlacpy_("A", &n, &i__1, &u2[(*k + 1) * u2_dim1 + 1], ldu2, &u[(*k + 1)
  493. * u_dim1 + 1], ldu);
  494. i__1 = n - *k;
  495. _starpu_dlacpy_("A", &i__1, &m, &vt2[*k + 1 + vt2_dim1], ldvt2, &vt[*k + 1 +
  496. vt_dim1], ldvt);
  497. }
  498. /* Copy CTOT into COLTYP for referencing in DLASD3. */
  499. for (j = 1; j <= 4; ++j) {
  500. coltyp[j] = ctot[j - 1];
  501. /* L190: */
  502. }
  503. return 0;
  504. /* End of DLASD2 */
  505. } /* _starpu_dlasd2_ */