2741 COMPLEX*16 zero, one
2742 parameter ( zero = ( 0.0d0, 0.0d0 ),
2743 $ one = ( 1.0d0, 0.0d0 ) )
2745 parameter ( rogue = ( -1.0d10, 1.0d10 ) )
2746 DOUBLE PRECISION rzero
2747 parameter ( rzero = 0.0d0 )
2748 DOUBLE PRECISION rrogue
2749 parameter ( rrogue = -1.0d10 )
2752 INTEGER kl, ku, lda, m, n, nmax
2754 CHARACTER*1 diag, uplo
2757 COMPLEX*16 a( nmax, * ), aa( * )
2759 INTEGER i, i1, i2, i3, ibeg, iend, ioff, j, jj, kk
2760 LOGICAL gen, lower, sym, tri, unit, upper
2765 INTRINSIC dble, dcmplx, dconjg, max, min
2767 gen =
TYPE( 1: 1 ).EQ.
'G'
2768 sym =
TYPE( 1: 1 ).EQ.
'H'
2769 tri =
TYPE( 1: 1 ).EQ.
'T'
2770 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2771 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2772 unit = tri.AND.diag.EQ.
'U'
2778 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2780 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2781 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2782 a( i, j ) =
zbeg( reset ) + transl
2788 a( j, i ) = dconjg( a( i, j ) )
2796 $ a( j, j ) = dcmplx( dble( a( j, j ) ), rzero )
2798 $ a( j, j ) = a( j, j ) + one
2805 IF( type.EQ.
'GE' )
THEN
2808 aa( i + ( j - 1 )*lda ) = a( i, j )
2810 DO 40 i = m + 1, lda
2811 aa( i + ( j - 1 )*lda ) = rogue
2814 ELSE IF( type.EQ.
'GB' )
THEN
2816 DO 60 i1 = 1, ku + 1 - j
2817 aa( i1 + ( j - 1 )*lda ) = rogue
2819 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2820 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2823 aa( i3 + ( j - 1 )*lda ) = rogue
2826 ELSE IF( type.EQ.
'HE'.OR.type.EQ.
'TR' )
THEN
2843 DO 100 i = 1, ibeg - 1
2844 aa( i + ( j - 1 )*lda ) = rogue
2846 DO 110 i = ibeg, iend
2847 aa( i + ( j - 1 )*lda ) = a( i, j )
2849 DO 120 i = iend + 1, lda
2850 aa( i + ( j - 1 )*lda ) = rogue
2853 jj = j + ( j - 1 )*lda
2854 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2857 ELSE IF( type.EQ.
'HB'.OR.type.EQ.
'TB' )
THEN
2861 ibeg = max( 1, kl + 2 - j )
2874 iend = min( kl + 1, 1 + m - j )
2876 DO 140 i = 1, ibeg - 1
2877 aa( i + ( j - 1 )*lda ) = rogue
2879 DO 150 i = ibeg, iend
2880 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2882 DO 160 i = iend + 1, lda
2883 aa( i + ( j - 1 )*lda ) = rogue
2886 jj = kk + ( j - 1 )*lda
2887 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2890 ELSE IF( type.EQ.
'HP'.OR.type.EQ.
'TP' )
THEN
2900 DO 180 i = ibeg, iend
2902 aa( ioff ) = a( i, j )
2905 $ aa( ioff ) = rogue
2907 $ aa( ioff ) = dcmplx( dble( aa( ioff ) ), rrogue )
complex *16 function zbeg(RESET)