155 SUBROUTINE dsbgst( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB,
165 INTEGER INFO, KA, KB, LDAB, LDBB, LDX, N
168 DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
175 DOUBLE PRECISION ZERO, ONE
176 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
179 LOGICAL UPDATE, UPPER, WANTX
180 INTEGER I, I0, I1, I2, INCA, J, J1, J1T, J2, J2T, K,
181 $ ka1, kb1, kbt, l, m, nr, nrt, nx
182 DOUBLE PRECISION BII, RA, RA1, T
200 wantx = lsame( vect,
'V' )
201 upper = lsame( uplo,
'U' )
205 IF( .NOT.wantx .AND. .NOT.lsame( vect,
'N' ) )
THEN
207 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
209 ELSE IF( n.LT.0 )
THEN
211 ELSE IF( ka.LT.0 )
THEN
213 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
215 ELSE IF( ldab.LT.ka+1 )
THEN
217 ELSE IF( ldbb.LT.kb+1 )
THEN
219 ELSE IF( ldx.LT.1 .OR. wantx .AND. ldx.LT.max( 1, n ) )
THEN
223 CALL xerbla(
'DSBGST', -info )
237 $
CALL dlaset(
'Full', n, n, zero, one, x, ldx )
339 ab( i-j+ka1, j ) = ab( i-j+ka1, j ) / bii
341 DO 30 j = max( 1, i-ka ), i
342 ab( j-i+ka1, i ) = ab( j-i+ka1, i ) / bii
344 DO 60 k = i - kbt, i - 1
346 ab( j-k+ka1, k ) = ab( j-k+ka1, k ) -
347 $ bb( j-i+kb1, i )*ab( k-i+ka1, i ) -
348 $ bb( k-i+kb1, i )*ab( j-i+ka1, i ) +
349 $ ab( ka1, i )*bb( j-i+kb1, i )*
352 DO 50 j = max( 1, i-ka ), i - kbt - 1
353 ab( j-k+ka1, k ) = ab( j-k+ka1, k ) -
354 $ bb( k-i+kb1, i )*ab( j-i+ka1, i )
358 DO 70 k = max( j-ka, i-kbt ), i - 1
359 ab( k-j+ka1, j ) = ab( k-j+ka1, j ) -
360 $ bb( k-i+kb1, i )*ab( i-j+ka1, j )
368 CALL dscal( n-m, one / bii, x( m+1, i ), 1 )
370 $
CALL dger( n-m, kbt, -one, x( m+1, i ), 1,
371 $ bb( kb1-kbt, i ), 1, x( m+1, i-kbt ), ldx )
376 ra1 = ab( i-i1+ka1, i1 )
389 IF( i-k+ka.LT.n .AND. i-k.GT.1 )
THEN
393 CALL dlartg( ab( k+1, i-k+ka ), ra1,
394 $ work( n+i-k+ka-m ), work( i-k+ka-m ),
400 t = -bb( kb1-k, i )*ra1
401 work( i-k ) = work( n+i-k+ka-m )*t -
402 $ work( i-k+ka-m )*ab( 1, i-k+ka )
403 ab( 1, i-k+ka ) = work( i-k+ka-m )*t +
404 $ work( n+i-k+ka-m )*ab( 1, i-k+ka )
408 j2 = i - k - 1 + max( 1, k-i0+2 )*ka1
409 nr = ( n-j2+ka ) / ka1
410 j1 = j2 + ( nr-1 )*ka1
412 j2t = max( j2, i+2*ka-k+1 )
416 nrt = ( n-j2t+ka ) / ka1
417 DO 90 j = j2t, j1, ka1
422 work( j-m ) = work( j-m )*ab( 1, j+1 )
423 ab( 1, j+1 ) = work( n+j-m )*ab( 1, j+1 )
430 $
CALL dlargv( nrt, ab( 1, j2t ), inca, work( j2t-m ),
432 $ work( n+j2t-m ), ka1 )
438 CALL dlartv( nr, ab( ka1-l, j2 ), inca,
439 $ ab( ka-l, j2+1 ), inca, work( n+j2-m ),
440 $ work( j2-m ), ka1 )
446 CALL dlar2v( nr, ab( ka1, j2 ), ab( ka1, j2+1 ),
447 $ ab( ka, j2+1 ), inca, work( n+j2-m ),
448 $ work( j2-m ), ka1 )
454 DO 110 l = ka - 1, kb - k + 1, -1
455 nrt = ( n-j2+l ) / ka1
457 $
CALL dlartv( nrt, ab( l, j2+ka1-l ), inca,
458 $ ab( l+1, j2+ka1-l ), inca,
459 $ work( n+j2-m ), work( j2-m ), ka1 )
466 DO 120 j = j2, j1, ka1
467 CALL drot( n-m, x( m+1, j ), 1, x( m+1, j+1 ), 1,
468 $ work( n+j-m ), work( j-m ) )
474 IF( i2.LE.n .AND. kbt.GT.0 )
THEN
479 work( i-kbt ) = -bb( kb1-kbt, i )*ra1
485 j2 = i - k - 1 + max( 2, k-i0+1 )*ka1
487 j2 = i - k - 1 + max( 1, k-i0+1 )*ka1
492 DO 140 l = kb - k, 1, -1
493 nrt = ( n-j2+ka+l ) / ka1
495 $
CALL dlartv( nrt, ab( l, j2-l+1 ), inca,
496 $ ab( l+1, j2-l+1 ), inca, work( n+j2-ka ),
497 $ work( j2-ka ), ka1 )
499 nr = ( n-j2+ka ) / ka1
500 j1 = j2 + ( nr-1 )*ka1
501 DO 150 j = j1, j2, -ka1
502 work( j ) = work( j-ka )
503 work( n+j ) = work( n+j-ka )
505 DO 160 j = j2, j1, ka1
510 work( j ) = work( j )*ab( 1, j+1 )
511 ab( 1, j+1 ) = work( n+j )*ab( 1, j+1 )
514 IF( i-k.LT.n-ka .AND. k.LE.kbt )
515 $ work( i-k+ka ) = work( i-k )
520 j2 = i - k - 1 + max( 1, k-i0+1 )*ka1
521 nr = ( n-j2+ka ) / ka1
522 j1 = j2 + ( nr-1 )*ka1
528 CALL dlargv( nr, ab( 1, j2 ), inca, work( j2 ), ka1,
529 $ work( n+j2 ), ka1 )
534 CALL dlartv( nr, ab( ka1-l, j2 ), inca,
535 $ ab( ka-l, j2+1 ), inca, work( n+j2 ),
542 CALL dlar2v( nr, ab( ka1, j2 ), ab( ka1, j2+1 ),
543 $ ab( ka, j2+1 ), inca, work( n+j2 ),
550 DO 190 l = ka - 1, kb - k + 1, -1
551 nrt = ( n-j2+l ) / ka1
553 $
CALL dlartv( nrt, ab( l, j2+ka1-l ), inca,
554 $ ab( l+1, j2+ka1-l ), inca, work( n+j2 ),
562 DO 200 j = j2, j1, ka1
563 CALL drot( n-m, x( m+1, j ), 1, x( m+1, j+1 ), 1,
564 $ work( n+j ), work( j ) )
570 j2 = i - k - 1 + max( 1, k-i0+2 )*ka1
574 DO 220 l = kb - k, 1, -1
575 nrt = ( n-j2+l ) / ka1
577 $
CALL dlartv( nrt, ab( l, j2+ka1-l ), inca,
578 $ ab( l+1, j2+ka1-l ), inca,
579 $ work( n+j2-m ), work( j2-m ), ka1 )
584 DO 240 j = n - 1, i - kb + 2*ka + 1, -1
585 work( n+j-m ) = work( n+j-ka-m )
586 work( j-m ) = work( j-ka-m )
600 ab( j-i+1, i ) = ab( j-i+1, i ) / bii
602 DO 260 j = max( 1, i-ka ), i
603 ab( i-j+1, j ) = ab( i-j+1, j ) / bii
605 DO 290 k = i - kbt, i - 1
606 DO 270 j = i - kbt, k
607 ab( k-j+1, j ) = ab( k-j+1, j ) -
608 $ bb( i-j+1, j )*ab( i-k+1, k ) -
609 $ bb( i-k+1, k )*ab( i-j+1, j ) +
610 $ ab( 1, i )*bb( i-j+1, j )*
613 DO 280 j = max( 1, i-ka ), i - kbt - 1
614 ab( k-j+1, j ) = ab( k-j+1, j ) -
615 $ bb( i-k+1, k )*ab( i-j+1, j )
619 DO 300 k = max( j-ka, i-kbt ), i - 1
620 ab( j-k+1, k ) = ab( j-k+1, k ) -
621 $ bb( i-k+1, k )*ab( j-i+1, i )
629 CALL dscal( n-m, one / bii, x( m+1, i ), 1 )
631 $
CALL dger( n-m, kbt, -one, x( m+1, i ), 1,
632 $ bb( kbt+1, i-kbt ), ldbb-1,
633 $ x( m+1, i-kbt ), ldx )
638 ra1 = ab( i1-i+1, i )
651 IF( i-k+ka.LT.n .AND. i-k.GT.1 )
THEN
655 CALL dlartg( ab( ka1-k, i ), ra1,
656 $ work( n+i-k+ka-m ),
657 $ work( i-k+ka-m ), ra )
662 t = -bb( k+1, i-k )*ra1
663 work( i-k ) = work( n+i-k+ka-m )*t -
664 $ work( i-k+ka-m )*ab( ka1, i-k )
665 ab( ka1, i-k ) = work( i-k+ka-m )*t +
666 $ work( n+i-k+ka-m )*ab( ka1, i-k )
670 j2 = i - k - 1 + max( 1, k-i0+2 )*ka1
671 nr = ( n-j2+ka ) / ka1
672 j1 = j2 + ( nr-1 )*ka1
674 j2t = max( j2, i+2*ka-k+1 )
678 nrt = ( n-j2t+ka ) / ka1
679 DO 320 j = j2t, j1, ka1
684 work( j-m ) = work( j-m )*ab( ka1, j-ka+1 )
685 ab( ka1, j-ka+1 ) = work( n+j-m )*ab( ka1, j-ka+1 )
692 $
CALL dlargv( nrt, ab( ka1, j2t-ka ), inca,
694 $ ka1, work( n+j2t-m ), ka1 )
700 CALL dlartv( nr, ab( l+1, j2-l ), inca,
701 $ ab( l+2, j2-l ), inca, work( n+j2-m ),
702 $ work( j2-m ), ka1 )
708 CALL dlar2v( nr, ab( 1, j2 ), ab( 1, j2+1 ), ab( 2,
710 $ inca, work( n+j2-m ), work( j2-m ), ka1 )
716 DO 340 l = ka - 1, kb - k + 1, -1
717 nrt = ( n-j2+l ) / ka1
719 $
CALL dlartv( nrt, ab( ka1-l+1, j2 ), inca,
720 $ ab( ka1-l, j2+1 ), inca, work( n+j2-m ),
721 $ work( j2-m ), ka1 )
728 DO 350 j = j2, j1, ka1
729 CALL drot( n-m, x( m+1, j ), 1, x( m+1, j+1 ), 1,
730 $ work( n+j-m ), work( j-m ) )
736 IF( i2.LE.n .AND. kbt.GT.0 )
THEN
741 work( i-kbt ) = -bb( kbt+1, i-kbt )*ra1
747 j2 = i - k - 1 + max( 2, k-i0+1 )*ka1
749 j2 = i - k - 1 + max( 1, k-i0+1 )*ka1
754 DO 370 l = kb - k, 1, -1
755 nrt = ( n-j2+ka+l ) / ka1
757 $
CALL dlartv( nrt, ab( ka1-l+1, j2-ka ), inca,
758 $ ab( ka1-l, j2-ka+1 ), inca,
759 $ work( n+j2-ka ), work( j2-ka ), ka1 )
761 nr = ( n-j2+ka ) / ka1
762 j1 = j2 + ( nr-1 )*ka1
763 DO 380 j = j1, j2, -ka1
764 work( j ) = work( j-ka )
765 work( n+j ) = work( n+j-ka )
767 DO 390 j = j2, j1, ka1
772 work( j ) = work( j )*ab( ka1, j-ka+1 )
773 ab( ka1, j-ka+1 ) = work( n+j )*ab( ka1, j-ka+1 )
776 IF( i-k.LT.n-ka .AND. k.LE.kbt )
777 $ work( i-k+ka ) = work( i-k )
782 j2 = i - k - 1 + max( 1, k-i0+1 )*ka1
783 nr = ( n-j2+ka ) / ka1
784 j1 = j2 + ( nr-1 )*ka1
790 CALL dlargv( nr, ab( ka1, j2-ka ), inca, work( j2 ),
792 $ work( n+j2 ), ka1 )
797 CALL dlartv( nr, ab( l+1, j2-l ), inca,
798 $ ab( l+2, j2-l ), inca, work( n+j2 ),
805 CALL dlar2v( nr, ab( 1, j2 ), ab( 1, j2+1 ), ab( 2,
807 $ inca, work( n+j2 ), work( j2 ), ka1 )
813 DO 420 l = ka - 1, kb - k + 1, -1
814 nrt = ( n-j2+l ) / ka1
816 $
CALL dlartv( nrt, ab( ka1-l+1, j2 ), inca,
817 $ ab( ka1-l, j2+1 ), inca, work( n+j2 ),
825 DO 430 j = j2, j1, ka1
826 CALL drot( n-m, x( m+1, j ), 1, x( m+1, j+1 ), 1,
827 $ work( n+j ), work( j ) )
833 j2 = i - k - 1 + max( 1, k-i0+2 )*ka1
837 DO 450 l = kb - k, 1, -1
838 nrt = ( n-j2+l ) / ka1
840 $
CALL dlartv( nrt, ab( ka1-l+1, j2 ), inca,
841 $ ab( ka1-l, j2+1 ), inca, work( n+j2-m ),
842 $ work( j2-m ), ka1 )
847 DO 470 j = n - 1, i - kb + 2*ka + 1, -1
848 work( n+j-m ) = work( n+j-ka-m )
849 work( j-m ) = work( j-ka-m )
898 IF( i.LT.m-kbt )
THEN
914 ab( j-i+ka1, i ) = ab( j-i+ka1, i ) / bii
916 DO 510 j = i, min( n, i+ka )
917 ab( i-j+ka1, j ) = ab( i-j+ka1, j ) / bii
919 DO 540 k = i + 1, i + kbt
920 DO 520 j = k, i + kbt
921 ab( k-j+ka1, j ) = ab( k-j+ka1, j ) -
922 $ bb( i-j+kb1, j )*ab( i-k+ka1, k ) -
923 $ bb( i-k+kb1, k )*ab( i-j+ka1, j ) +
924 $ ab( ka1, i )*bb( i-j+kb1, j )*
927 DO 530 j = i + kbt + 1, min( n, i+ka )
928 ab( k-j+ka1, j ) = ab( k-j+ka1, j ) -
929 $ bb( i-k+kb1, k )*ab( i-j+ka1, j )
933 DO 550 k = i + 1, min( j+ka, i+kbt )
934 ab( j-k+ka1, k ) = ab( j-k+ka1, k ) -
935 $ bb( i-k+kb1, k )*ab( j-i+ka1, i )
943 CALL dscal( nx, one / bii, x( 1, i ), 1 )
945 $
CALL dger( nx, kbt, -one, x( 1, i ), 1, bb( kb,
947 $ ldbb-1, x( 1, i+1 ), ldx )
952 ra1 = ab( i1-i+ka1, i )
964 IF( i+k-ka1.GT.0 .AND. i+k.LT.m )
THEN
968 CALL dlartg( ab( k+1, i ), ra1, work( n+i+k-ka ),
969 $ work( i+k-ka ), ra )
974 t = -bb( kb1-k, i+k )*ra1
975 work( m-kb+i+k ) = work( n+i+k-ka )*t -
976 $ work( i+k-ka )*ab( 1, i+k )
977 ab( 1, i+k ) = work( i+k-ka )*t +
978 $ work( n+i+k-ka )*ab( 1, i+k )
982 j2 = i + k + 1 - max( 1, k+i0-m+1 )*ka1
983 nr = ( j2+ka-1 ) / ka1
984 j1 = j2 - ( nr-1 )*ka1
986 j2t = min( j2, i-2*ka+k-1 )
990 nrt = ( j2t+ka-1 ) / ka1
991 DO 570 j = j1, j2t, ka1
996 work( j ) = work( j )*ab( 1, j+ka-1 )
997 ab( 1, j+ka-1 ) = work( n+j )*ab( 1, j+ka-1 )
1004 $
CALL dlargv( nrt, ab( 1, j1+ka ), inca, work( j1 ),
1006 $ work( n+j1 ), ka1 )
1011 DO 580 l = 1, ka - 1
1012 CALL dlartv( nr, ab( ka1-l, j1+l ), inca,
1013 $ ab( ka-l, j1+l ), inca, work( n+j1 ),
1020 CALL dlar2v( nr, ab( ka1, j1 ), ab( ka1, j1-1 ),
1021 $ ab( ka, j1 ), inca, work( n+j1 ),
1028 DO 590 l = ka - 1, kb - k + 1, -1
1029 nrt = ( j2+l-1 ) / ka1
1030 j1t = j2 - ( nrt-1 )*ka1
1032 $
CALL dlartv( nrt, ab( l, j1t ), inca,
1033 $ ab( l+1, j1t-1 ), inca, work( n+j1t ),
1034 $ work( j1t ), ka1 )
1041 DO 600 j = j1, j2, ka1
1042 CALL drot( nx, x( 1, j ), 1, x( 1, j-1 ), 1,
1043 $ work( n+j ), work( j ) )
1049 IF( i2.GT.0 .AND. kbt.GT.0 )
THEN
1054 work( m-kb+i+kbt ) = -bb( kb1-kbt, i+kbt )*ra1
1058 DO 650 k = kb, 1, -1
1060 j2 = i + k + 1 - max( 2, k+i0-m )*ka1
1062 j2 = i + k + 1 - max( 1, k+i0-m )*ka1
1067 DO 620 l = kb - k, 1, -1
1068 nrt = ( j2+ka+l-1 ) / ka1
1069 j1t = j2 - ( nrt-1 )*ka1
1071 $
CALL dlartv( nrt, ab( l, j1t+ka ), inca,
1072 $ ab( l+1, j1t+ka-1 ), inca,
1073 $ work( n+m-kb+j1t+ka ),
1074 $ work( m-kb+j1t+ka ), ka1 )
1076 nr = ( j2+ka-1 ) / ka1
1077 j1 = j2 - ( nr-1 )*ka1
1078 DO 630 j = j1, j2, ka1
1079 work( m-kb+j ) = work( m-kb+j+ka )
1080 work( n+m-kb+j ) = work( n+m-kb+j+ka )
1082 DO 640 j = j1, j2, ka1
1087 work( m-kb+j ) = work( m-kb+j )*ab( 1, j+ka-1 )
1088 ab( 1, j+ka-1 ) = work( n+m-kb+j )*ab( 1, j+ka-1 )
1091 IF( i+k.GT.ka1 .AND. k.LE.kbt )
1092 $ work( m-kb+i+k-ka ) = work( m-kb+i+k )
1096 DO 690 k = kb, 1, -1
1097 j2 = i + k + 1 - max( 1, k+i0-m )*ka1
1098 nr = ( j2+ka-1 ) / ka1
1099 j1 = j2 - ( nr-1 )*ka1
1105 CALL dlargv( nr, ab( 1, j1+ka ), inca,
1107 $ ka1, work( n+m-kb+j1 ), ka1 )
1111 DO 660 l = 1, ka - 1
1112 CALL dlartv( nr, ab( ka1-l, j1+l ), inca,
1113 $ ab( ka-l, j1+l ), inca,
1114 $ work( n+m-kb+j1 ), work( m-kb+j1 ), ka1 )
1120 CALL dlar2v( nr, ab( ka1, j1 ), ab( ka1, j1-1 ),
1121 $ ab( ka, j1 ), inca, work( n+m-kb+j1 ),
1122 $ work( m-kb+j1 ), ka1 )
1128 DO 670 l = ka - 1, kb - k + 1, -1
1129 nrt = ( j2+l-1 ) / ka1
1130 j1t = j2 - ( nrt-1 )*ka1
1132 $
CALL dlartv( nrt, ab( l, j1t ), inca,
1133 $ ab( l+1, j1t-1 ), inca,
1134 $ work( n+m-kb+j1t ), work( m-kb+j1t ),
1142 DO 680 j = j1, j2, ka1
1143 CALL drot( nx, x( 1, j ), 1, x( 1, j-1 ), 1,
1144 $ work( n+m-kb+j ), work( m-kb+j ) )
1149 DO 710 k = 1, kb - 1
1150 j2 = i + k + 1 - max( 1, k+i0-m+1 )*ka1
1154 DO 700 l = kb - k, 1, -1
1155 nrt = ( j2+l-1 ) / ka1
1156 j1t = j2 - ( nrt-1 )*ka1
1158 $
CALL dlartv( nrt, ab( l, j1t ), inca,
1159 $ ab( l+1, j1t-1 ), inca, work( n+j1t ),
1160 $ work( j1t ), ka1 )
1165 DO 720 j = 2, min( i+kb, m ) - 2*ka - 1
1166 work( n+j ) = work( n+j+ka )
1167 work( j ) = work( j+ka )
1181 ab( i-j+1, j ) = ab( i-j+1, j ) / bii
1183 DO 740 j = i, min( n, i+ka )
1184 ab( j-i+1, i ) = ab( j-i+1, i ) / bii
1186 DO 770 k = i + 1, i + kbt
1187 DO 750 j = k, i + kbt
1188 ab( j-k+1, k ) = ab( j-k+1, k ) -
1189 $ bb( j-i+1, i )*ab( k-i+1, i ) -
1190 $ bb( k-i+1, i )*ab( j-i+1, i ) +
1191 $ ab( 1, i )*bb( j-i+1, i )*
1194 DO 760 j = i + kbt + 1, min( n, i+ka )
1195 ab( j-k+1, k ) = ab( j-k+1, k ) -
1196 $ bb( k-i+1, i )*ab( j-i+1, i )
1200 DO 780 k = i + 1, min( j+ka, i+kbt )
1201 ab( k-j+1, j ) = ab( k-j+1, j ) -
1202 $ bb( k-i+1, i )*ab( i-j+1, j )
1210 CALL dscal( nx, one / bii, x( 1, i ), 1 )
1212 $
CALL dger( nx, kbt, -one, x( 1, i ), 1, bb( 2, i ),
1214 $ x( 1, i+1 ), ldx )
1219 ra1 = ab( i-i1+1, i1 )
1225 DO 840 k = 1, kb - 1
1231 IF( i+k-ka1.GT.0 .AND. i+k.LT.m )
THEN
1235 CALL dlartg( ab( ka1-k, i+k-ka ), ra1,
1236 $ work( n+i+k-ka ), work( i+k-ka ), ra )
1241 t = -bb( k+1, i )*ra1
1242 work( m-kb+i+k ) = work( n+i+k-ka )*t -
1243 $ work( i+k-ka )*ab( ka1, i+k-ka )
1244 ab( ka1, i+k-ka ) = work( i+k-ka )*t +
1245 $ work( n+i+k-ka )*ab( ka1, i+k-ka )
1249 j2 = i + k + 1 - max( 1, k+i0-m+1 )*ka1
1250 nr = ( j2+ka-1 ) / ka1
1251 j1 = j2 - ( nr-1 )*ka1
1253 j2t = min( j2, i-2*ka+k-1 )
1257 nrt = ( j2t+ka-1 ) / ka1
1258 DO 800 j = j1, j2t, ka1
1263 work( j ) = work( j )*ab( ka1, j-1 )
1264 ab( ka1, j-1 ) = work( n+j )*ab( ka1, j-1 )
1271 $
CALL dlargv( nrt, ab( ka1, j1 ), inca, work( j1 ),
1273 $ work( n+j1 ), ka1 )
1278 DO 810 l = 1, ka - 1
1279 CALL dlartv( nr, ab( l+1, j1 ), inca, ab( l+2,
1281 $ inca, work( n+j1 ), work( j1 ), ka1 )
1287 CALL dlar2v( nr, ab( 1, j1 ), ab( 1, j1-1 ),
1288 $ ab( 2, j1-1 ), inca, work( n+j1 ),
1295 DO 820 l = ka - 1, kb - k + 1, -1
1296 nrt = ( j2+l-1 ) / ka1
1297 j1t = j2 - ( nrt-1 )*ka1
1299 $
CALL dlartv( nrt, ab( ka1-l+1, j1t-ka1+l ), inca,
1300 $ ab( ka1-l, j1t-ka1+l ), inca,
1301 $ work( n+j1t ), work( j1t ), ka1 )
1308 DO 830 j = j1, j2, ka1
1309 CALL drot( nx, x( 1, j ), 1, x( 1, j-1 ), 1,
1310 $ work( n+j ), work( j ) )
1316 IF( i2.GT.0 .AND. kbt.GT.0 )
THEN
1321 work( m-kb+i+kbt ) = -bb( kbt+1, i )*ra1
1325 DO 880 k = kb, 1, -1
1327 j2 = i + k + 1 - max( 2, k+i0-m )*ka1
1329 j2 = i + k + 1 - max( 1, k+i0-m )*ka1
1334 DO 850 l = kb - k, 1, -1
1335 nrt = ( j2+ka+l-1 ) / ka1
1336 j1t = j2 - ( nrt-1 )*ka1
1338 $
CALL dlartv( nrt, ab( ka1-l+1, j1t+l-1 ), inca,
1339 $ ab( ka1-l, j1t+l-1 ), inca,
1340 $ work( n+m-kb+j1t+ka ),
1341 $ work( m-kb+j1t+ka ), ka1 )
1343 nr = ( j2+ka-1 ) / ka1
1344 j1 = j2 - ( nr-1 )*ka1
1345 DO 860 j = j1, j2, ka1
1346 work( m-kb+j ) = work( m-kb+j+ka )
1347 work( n+m-kb+j ) = work( n+m-kb+j+ka )
1349 DO 870 j = j1, j2, ka1
1354 work( m-kb+j ) = work( m-kb+j )*ab( ka1, j-1 )
1355 ab( ka1, j-1 ) = work( n+m-kb+j )*ab( ka1, j-1 )
1358 IF( i+k.GT.ka1 .AND. k.LE.kbt )
1359 $ work( m-kb+i+k-ka ) = work( m-kb+i+k )
1363 DO 920 k = kb, 1, -1
1364 j2 = i + k + 1 - max( 1, k+i0-m )*ka1
1365 nr = ( j2+ka-1 ) / ka1
1366 j1 = j2 - ( nr-1 )*ka1
1372 CALL dlargv( nr, ab( ka1, j1 ), inca, work( m-kb+j1 ),
1373 $ ka1, work( n+m-kb+j1 ), ka1 )
1377 DO 890 l = 1, ka - 1
1378 CALL dlartv( nr, ab( l+1, j1 ), inca, ab( l+2,
1380 $ inca, work( n+m-kb+j1 ), work( m-kb+j1 ),
1387 CALL dlar2v( nr, ab( 1, j1 ), ab( 1, j1-1 ),
1388 $ ab( 2, j1-1 ), inca, work( n+m-kb+j1 ),
1389 $ work( m-kb+j1 ), ka1 )
1395 DO 900 l = ka - 1, kb - k + 1, -1
1396 nrt = ( j2+l-1 ) / ka1
1397 j1t = j2 - ( nrt-1 )*ka1
1399 $
CALL dlartv( nrt, ab( ka1-l+1, j1t-ka1+l ), inca,
1400 $ ab( ka1-l, j1t-ka1+l ), inca,
1401 $ work( n+m-kb+j1t ), work( m-kb+j1t ),
1409 DO 910 j = j1, j2, ka1
1410 CALL drot( nx, x( 1, j ), 1, x( 1, j-1 ), 1,
1411 $ work( n+m-kb+j ), work( m-kb+j ) )
1416 DO 940 k = 1, kb - 1
1417 j2 = i + k + 1 - max( 1, k+i0-m+1 )*ka1
1421 DO 930 l = kb - k, 1, -1
1422 nrt = ( j2+l-1 ) / ka1
1423 j1t = j2 - ( nrt-1 )*ka1
1425 $
CALL dlartv( nrt, ab( ka1-l+1, j1t-ka1+l ), inca,
1426 $ ab( ka1-l, j1t-ka1+l ), inca,
1427 $ work( n+j1t ), work( j1t ), ka1 )
1432 DO 950 j = 2, min( i+kb, m ) - 2*ka - 1
1433 work( n+j ) = work( n+j+ka )
1434 work( j ) = work( j+ka )