2735 parameter ( zero = ( 0.0, 0.0 ), one = ( 1.0, 0.0 ) )
2737 parameter ( rogue = ( -1.0e10, 1.0e10 ) )
2739 parameter ( rzero = 0.0 )
2741 parameter ( rrogue = -1.0e10 )
2744 INTEGER kl, ku, lda, m, n, nmax
2746 CHARACTER*1 diag, uplo
2749 COMPLEX a( nmax, * ), aa( * )
2751 INTEGER i, i1, i2, i3, ibeg, iend, ioff, j, jj, kk
2752 LOGICAL gen, lower, sym, tri, unit, upper
2757 INTRINSIC cmplx, conjg, max, min, real
2759 gen =
TYPE( 1: 1 ).EQ.
'G'
2760 sym =
TYPE( 1: 1 ).EQ.
'H'
2761 tri =
TYPE( 1: 1 ).EQ.
'T'
2762 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2763 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2764 unit = tri.AND.diag.EQ.
'U'
2770 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2772 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2773 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2774 a( i, j ) =
cbeg( reset ) + transl
2780 a( j, i ) = conjg( a( i, j ) )
2788 $ a( j, j ) = cmplx(
REAL( A( J, J ) ), rzero )
2790 $ a( j, j ) = a( j, j ) + one
2797 IF( type.EQ.
'GE' )
THEN
2800 aa( i + ( j - 1 )*lda ) = a( i, j )
2802 DO 40 i = m + 1, lda
2803 aa( i + ( j - 1 )*lda ) = rogue
2806 ELSE IF( type.EQ.
'GB' )
THEN
2808 DO 60 i1 = 1, ku + 1 - j
2809 aa( i1 + ( j - 1 )*lda ) = rogue
2811 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2812 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2815 aa( i3 + ( j - 1 )*lda ) = rogue
2818 ELSE IF( type.EQ.
'HE'.OR.type.EQ.
'TR' )
THEN
2835 DO 100 i = 1, ibeg - 1
2836 aa( i + ( j - 1 )*lda ) = rogue
2838 DO 110 i = ibeg, iend
2839 aa( i + ( j - 1 )*lda ) = a( i, j )
2841 DO 120 i = iend + 1, lda
2842 aa( i + ( j - 1 )*lda ) = rogue
2845 jj = j + ( j - 1 )*lda
2846 aa( jj ) = cmplx(
REAL( AA( JJ ) ), rrogue )
2849 ELSE IF( type.EQ.
'HB'.OR.type.EQ.
'TB' )
THEN
2853 ibeg = max( 1, kl + 2 - j )
2866 iend = min( kl + 1, 1 + m - j )
2868 DO 140 i = 1, ibeg - 1
2869 aa( i + ( j - 1 )*lda ) = rogue
2871 DO 150 i = ibeg, iend
2872 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2874 DO 160 i = iend + 1, lda
2875 aa( i + ( j - 1 )*lda ) = rogue
2878 jj = kk + ( j - 1 )*lda
2879 aa( jj ) = cmplx(
REAL( AA( JJ ) ), rrogue )
2882 ELSE IF( type.EQ.
'HP'.OR.type.EQ.
'TP' )
THEN
2892 DO 180 i = ibeg, iend
2894 aa( ioff ) = a( i, j )
2897 $ aa( ioff ) = rogue
2899 $ aa( ioff ) = cmplx(
REAL( AA( IOFF ) ), rrogue )
complex function cbeg(RESET)