265 SUBROUTINE dlalsa( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
266 $ LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
267 $ GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
276 INTEGER ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
280 INTEGER GIVCOL( ldgcol, * ), GIVPTR( * ), IWORK( * ),
281 $ k( * ), perm( ldgcol, * )
282 DOUBLE PRECISION B( ldb, * ), BX( ldbx, * ), C( * ),
283 $ difl( ldu, * ), difr( ldu, * ),
284 $ givnum( ldu, * ), poles( ldu, * ), s( * ),
285 $ u( ldu, * ), vt( ldu, * ), work( * ),
292 DOUBLE PRECISION ZERO, ONE
293 parameter( zero = 0.0d0, one = 1.0d0 )
296 INTEGER I, I1, IC, IM1, INODE, J, LF, LL, LVL, LVL2,
297 $ nd, ndb1, ndiml, ndimr, nl, nlf, nlp1, nlvl,
298 $ nr, nrf, nrp1, sqre
309 IF( ( icompq.LT.0 ) .OR. ( icompq.GT.1 ) )
THEN 311 ELSE IF( smlsiz.LT.3 )
THEN 313 ELSE IF( n.LT.smlsiz )
THEN 315 ELSE IF( nrhs.LT.1 )
THEN 317 ELSE IF( ldb.LT.n )
THEN 319 ELSE IF( ldbx.LT.n )
THEN 321 ELSE IF( ldu.LT.n )
THEN 323 ELSE IF( ldgcol.LT.n )
THEN 327 CALL xerbla(
'DLALSA', -info )
337 CALL dlasdt( n, nlvl, nd, iwork( inode ), iwork( ndiml ),
338 $ iwork( ndimr ), smlsiz )
343 IF( icompq.EQ.1 )
THEN 362 ic = iwork( inode+i1 )
363 nl = iwork( ndiml+i1 )
364 nr = iwork( ndimr+i1 )
367 CALL dgemm(
'T',
'N', nl, nrhs, nl, one, u( nlf, 1 ), ldu,
368 $ b( nlf, 1 ), ldb, zero, bx( nlf, 1 ), ldbx )
369 CALL dgemm(
'T',
'N', nr, nrhs, nr, one, u( nrf, 1 ), ldu,
370 $ b( nrf, 1 ), ldb, zero, bx( nrf, 1 ), ldbx )
377 ic = iwork( inode+i-1 )
378 CALL dcopy( nrhs, b( ic, 1 ), ldb, bx( ic, 1 ), ldbx )
387 DO 40 lvl = nlvl, 1, -1
402 ic = iwork( inode+im1 )
403 nl = iwork( ndiml+im1 )
404 nr = iwork( ndimr+im1 )
408 CALL dlals0( icompq, nl, nr, sqre, nrhs, bx( nlf, 1 ), ldbx,
409 $ b( nlf, 1 ), ldb, perm( nlf, lvl ),
410 $ givptr( j ), givcol( nlf, lvl2 ), ldgcol,
411 $ givnum( nlf, lvl2 ), ldu, poles( nlf, lvl2 ),
412 $ difl( nlf, lvl ), difr( nlf, lvl2 ),
413 $ z( nlf, lvl ), k( j ), c( j ), s( j ), work,
442 ic = iwork( inode+im1 )
443 nl = iwork( ndiml+im1 )
444 nr = iwork( ndimr+im1 )
453 CALL dlals0( icompq, nl, nr, sqre, nrhs, b( nlf, 1 ), ldb,
454 $ bx( nlf, 1 ), ldbx, perm( nlf, lvl ),
455 $ givptr( j ), givcol( nlf, lvl2 ), ldgcol,
456 $ givnum( nlf, lvl2 ), ldu, poles( nlf, lvl2 ),
457 $ difl( nlf, lvl ), difr( nlf, lvl2 ),
458 $ z( nlf, lvl ), k( j ), c( j ), s( j ), work,
470 ic = iwork( inode+i1 )
471 nl = iwork( ndiml+i1 )
472 nr = iwork( ndimr+i1 )
481 CALL dgemm(
'T',
'N', nlp1, nrhs, nlp1, one, vt( nlf, 1 ), ldu,
482 $ b( nlf, 1 ), ldb, zero, bx( nlf, 1 ), ldbx )
483 CALL dgemm(
'T',
'N', nrp1, nrhs, nrp1, one, vt( nrf, 1 ), ldu,
484 $ b( nrf, 1 ), ldb, zero, bx( nrf, 1 ), ldbx )
subroutine dcopy(N, DX, INCX, DY, INCY)
DCOPY
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
subroutine dlasdt(N, LVL, ND, INODE, NDIML, NDIMR, MSUB)
DLASDT creates a tree of subproblems for bidiagonal divide and conquer. Used by sbdsdc.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dlals0(ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX, PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO)
DLALS0 applies back multiplying factors in solving the least squares problem using divide and conquer...
subroutine dlalsa(ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U, LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK, IWORK, INFO)
DLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.