2759 parameter ( zero = ( 0.0, 0.0 ), one = ( 1.0, 0.0 ) )
2761 parameter ( rogue = ( -1.0e10, 1.0e10 ) )
2763 parameter ( rzero = 0.0 )
2765 parameter ( rrogue = -1.0e10 )
2768 INTEGER kl, ku, lda, m, n, nmax
2770 CHARACTER*1 diag, uplo
2773 COMPLEX a( nmax, * ), aa( * )
2775 INTEGER i, i1, i2, i3, ibeg, iend, ioff, j, jj, kk
2776 LOGICAL gen, lower, sym, tri, unit, upper
2781 INTRINSIC cmplx, conjg, max, min, real
2783 gen =
TYPE( 1: 1 ).EQ.
'g'
2784 sym =
TYPE( 1: 1 ).EQ.
'h'
2785 tri =
TYPE( 1: 1 ).EQ.
't'
2786 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2787 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2788 unit = tri.AND.diag.EQ.
'U'
2794 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2796 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2797 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2798 a( i, j ) =
cbeg( reset ) + transl
2804 a( j, i ) = conjg( a( i, j ) )
2812 $ a( j, j ) = cmplx(
REAL( A( J, J ) ), rzero )
2814 $ a( j, j ) = a( j, j ) + one
2821 IF( type.EQ.
'ge' )
THEN
2824 aa( i + ( j - 1 )*lda ) = a( i, j )
2826 DO 40 i = m + 1, lda
2827 aa( i + ( j - 1 )*lda ) = rogue
2830 ELSE IF( type.EQ.
'gb' )
THEN
2832 DO 60 i1 = 1, ku + 1 - j
2833 aa( i1 + ( j - 1 )*lda ) = rogue
2835 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2836 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2839 aa( i3 + ( j - 1 )*lda ) = rogue
2842 ELSE IF( type.EQ.
'he'.OR.type.EQ.
'tr' )
THEN
2859 DO 100 i = 1, ibeg - 1
2860 aa( i + ( j - 1 )*lda ) = rogue
2862 DO 110 i = ibeg, iend
2863 aa( i + ( j - 1 )*lda ) = a( i, j )
2865 DO 120 i = iend + 1, lda
2866 aa( i + ( j - 1 )*lda ) = rogue
2869 jj = j + ( j - 1 )*lda
2870 aa( jj ) = cmplx(
REAL( AA( JJ ) ), rrogue )
2873 ELSE IF( type.EQ.
'hb'.OR.type.EQ.
'tb' )
THEN
2877 ibeg = max( 1, kl + 2 - j )
2890 iend = min( kl + 1, 1 + m - j )
2892 DO 140 i = 1, ibeg - 1
2893 aa( i + ( j - 1 )*lda ) = rogue
2895 DO 150 i = ibeg, iend
2896 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2898 DO 160 i = iend + 1, lda
2899 aa( i + ( j - 1 )*lda ) = rogue
2902 jj = kk + ( j - 1 )*lda
2903 aa( jj ) = cmplx(
REAL( AA( JJ ) ), rrogue )
2906 ELSE IF( type.EQ.
'hp'.OR.type.EQ.
'tp' )
THEN
2916 DO 180 i = ibeg, iend
2918 aa( ioff ) = a( i, j )
2921 $ aa( ioff ) = rogue
2923 $ aa( ioff ) = cmplx(
REAL( AA( IOFF ) ), rrogue )
complex function cbeg(RESET)