2764 COMPLEX*16 zero, one
2765 parameter ( zero = ( 0.0d0, 0.0d0 ),
2766 $ one = ( 1.0d0, 0.0d0 ) )
2768 parameter ( rogue = ( -1.0d10, 1.0d10 ) )
2769 DOUBLE PRECISION rzero
2770 parameter ( rzero = 0.0d0 )
2771 DOUBLE PRECISION rrogue
2772 parameter ( rrogue = -1.0d10 )
2775 INTEGER kl, ku, lda, m, n, nmax
2777 CHARACTER*1 diag, uplo
2780 COMPLEX*16 a( nmax, * ), aa( * )
2782 INTEGER i, i1, i2, i3, ibeg, iend, ioff, j, jj, kk
2783 LOGICAL gen, lower, sym, tri, unit, upper
2788 INTRINSIC dcmplx, dconjg, max, min, dble
2790 gen =
TYPE( 1: 1 ).EQ.
'g'
2791 sym =
TYPE( 1: 1 ).EQ.
'h'
2792 tri =
TYPE( 1: 1 ).EQ.
't'
2793 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2794 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2795 unit = tri.AND.diag.EQ.
'U'
2801 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2803 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2804 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2805 a( i, j ) =
zbeg( reset ) + transl
2811 a( j, i ) = dconjg( a( i, j ) )
2819 $ a( j, j ) = dcmplx( dble( a( j, j ) ), rzero )
2821 $ a( j, j ) = a( j, j ) + one
2828 IF( type.EQ.
'ge' )
THEN
2831 aa( i + ( j - 1 )*lda ) = a( i, j )
2833 DO 40 i = m + 1, lda
2834 aa( i + ( j - 1 )*lda ) = rogue
2837 ELSE IF( type.EQ.
'gb' )
THEN
2839 DO 60 i1 = 1, ku + 1 - j
2840 aa( i1 + ( j - 1 )*lda ) = rogue
2842 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2843 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2846 aa( i3 + ( j - 1 )*lda ) = rogue
2849 ELSE IF( type.EQ.
'he'.OR.type.EQ.
'tr' )
THEN
2866 DO 100 i = 1, ibeg - 1
2867 aa( i + ( j - 1 )*lda ) = rogue
2869 DO 110 i = ibeg, iend
2870 aa( i + ( j - 1 )*lda ) = a( i, j )
2872 DO 120 i = iend + 1, lda
2873 aa( i + ( j - 1 )*lda ) = rogue
2876 jj = j + ( j - 1 )*lda
2877 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2880 ELSE IF( type.EQ.
'hb'.OR.type.EQ.
'tb' )
THEN
2884 ibeg = max( 1, kl + 2 - j )
2897 iend = min( kl + 1, 1 + m - j )
2899 DO 140 i = 1, ibeg - 1
2900 aa( i + ( j - 1 )*lda ) = rogue
2902 DO 150 i = ibeg, iend
2903 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2905 DO 160 i = iend + 1, lda
2906 aa( i + ( j - 1 )*lda ) = rogue
2909 jj = kk + ( j - 1 )*lda
2910 aa( jj ) = dcmplx( dble( aa( jj ) ), rrogue )
2913 ELSE IF( type.EQ.
'hp'.OR.type.EQ.
'tp' )
THEN
2923 DO 180 i = ibeg, iend
2925 aa( ioff ) = a( i, j )
2928 $ aa( ioff ) = rogue
2930 $ aa( ioff ) = dcmplx( dble( aa( ioff ) ), rrogue )
complex *16 function zbeg(RESET)