2668 DOUBLE PRECISION zero, one
2669 parameter ( zero = 0.0d0, one = 1.0d0 )
2670 DOUBLE PRECISION rogue
2671 parameter ( rogue = -1.0d10 )
2673 DOUBLE PRECISION transl
2674 INTEGER kl, ku, lda, m, n, nmax
2676 CHARACTER*1 diag, uplo
2679 DOUBLE PRECISION a( nmax, * ), aa( * )
2681 INTEGER i, i1, i2, i3, ibeg, iend, ioff, j, kk
2682 LOGICAL gen, lower, sym, tri, unit, upper
2684 DOUBLE PRECISION dbeg
2689 gen =
TYPE( 1: 1 ).EQ.
'G'
2690 sym =
TYPE( 1: 1 ).EQ.
'S'
2691 tri =
TYPE( 1: 1 ).EQ.
'T'
2692 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2693 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2694 unit = tri.AND.diag.EQ.
'U'
2700 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2702 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2703 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2704 a( i, j ) =
dbeg( reset ) + transl
2710 a( j, i ) = a( i, j )
2718 $ a( j, j ) = a( j, j ) + one
2725 IF( type.EQ.
'GE' )
THEN
2728 aa( i + ( j - 1 )*lda ) = a( i, j )
2730 DO 40 i = m + 1, lda
2731 aa( i + ( j - 1 )*lda ) = rogue
2734 ELSE IF( type.EQ.
'GB' )
THEN
2736 DO 60 i1 = 1, ku + 1 - j
2737 aa( i1 + ( j - 1 )*lda ) = rogue
2739 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2740 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2743 aa( i3 + ( j - 1 )*lda ) = rogue
2746 ELSE IF( type.EQ.
'SY'.OR.type.EQ.
'TR' )
THEN
2763 DO 100 i = 1, ibeg - 1
2764 aa( i + ( j - 1 )*lda ) = rogue
2766 DO 110 i = ibeg, iend
2767 aa( i + ( j - 1 )*lda ) = a( i, j )
2769 DO 120 i = iend + 1, lda
2770 aa( i + ( j - 1 )*lda ) = rogue
2773 ELSE IF( type.EQ.
'SB'.OR.type.EQ.
'TB' )
THEN
2777 ibeg = max( 1, kl + 2 - j )
2790 iend = min( kl + 1, 1 + m - j )
2792 DO 140 i = 1, ibeg - 1
2793 aa( i + ( j - 1 )*lda ) = rogue
2795 DO 150 i = ibeg, iend
2796 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2798 DO 160 i = iend + 1, lda
2799 aa( i + ( j - 1 )*lda ) = rogue
2802 ELSE IF( type.EQ.
'SP'.OR.type.EQ.
'TP' )
THEN
2812 DO 180 i = ibeg, iend
2814 aa( ioff ) = a( i, j )
2817 $ aa( ioff ) = rogue
double precision function dbeg(RESET)