2480 DOUBLE PRECISION zero, one
2481 parameter ( zero = 0.0d0, one = 1.0d0 )
2482 DOUBLE PRECISION rogue
2483 parameter ( rogue = -1.0d10 )
2485 DOUBLE PRECISION transl
2486 INTEGER kl, ku, lda, m, n, nmax
2488 CHARACTER*1 diag, uplo
2491 DOUBLE PRECISION a( nmax, * ), aa( * )
2493 INTEGER i, i1, i2, i3, ibeg, iend, ioff, j, kk
2494 LOGICAL gen, lower, sym, tri, unit, upper
2496 DOUBLE PRECISION dbeg
2501 gen =
TYPE( 1: 1 ).EQ.
'g'
2502 sym =
TYPE( 1: 1 ).EQ.
's'
2503 tri =
TYPE( 1: 1 ).EQ.
't'
2504 upper = ( sym.OR.tri ).AND.uplo.EQ.
'U'
2505 lower = ( sym.OR.tri ).AND.uplo.EQ.
'L'
2506 unit = tri.AND.diag.EQ.
'U'
2512 IF( gen.OR.( upper.AND.i.LE.j ).OR.( lower.AND.i.GE.j ) )
2514 IF( ( i.LE.j.AND.j - i.LE.ku ).OR.
2515 $ ( i.GE.j.AND.i - j.LE.kl ) )
THEN
2516 a( i, j ) =
dbeg( reset ) + transl
2522 a( j, i ) = a( i, j )
2530 $ a( j, j ) = a( j, j ) + one
2537 IF( type.EQ.
'ge' )
THEN
2540 aa( i + ( j - 1 )*lda ) = a( i, j )
2542 DO 40 i = m + 1, lda
2543 aa( i + ( j - 1 )*lda ) = rogue
2546 ELSE IF( type.EQ.
'gb' )
THEN
2548 DO 60 i1 = 1, ku + 1 - j
2549 aa( i1 + ( j - 1 )*lda ) = rogue
2551 DO 70 i2 = i1, min( kl + ku + 1, ku + 1 + m - j )
2552 aa( i2 + ( j - 1 )*lda ) = a( i2 + j - ku - 1, j )
2555 aa( i3 + ( j - 1 )*lda ) = rogue
2558 ELSE IF( type.EQ.
'sy'.OR.type.EQ.
'tr' )
THEN
2575 DO 100 i = 1, ibeg - 1
2576 aa( i + ( j - 1 )*lda ) = rogue
2578 DO 110 i = ibeg, iend
2579 aa( i + ( j - 1 )*lda ) = a( i, j )
2581 DO 120 i = iend + 1, lda
2582 aa( i + ( j - 1 )*lda ) = rogue
2585 ELSE IF( type.EQ.
'sb'.OR.type.EQ.
'tb' )
THEN
2589 ibeg = max( 1, kl + 2 - j )
2602 iend = min( kl + 1, 1 + m - j )
2604 DO 140 i = 1, ibeg - 1
2605 aa( i + ( j - 1 )*lda ) = rogue
2607 DO 150 i = ibeg, iend
2608 aa( i + ( j - 1 )*lda ) = a( i + j - kk, j )
2610 DO 160 i = iend + 1, lda
2611 aa( i + ( j - 1 )*lda ) = rogue
2614 ELSE IF( type.EQ.
'sp'.OR.type.EQ.
'tp' )
THEN
2624 DO 180 i = ibeg, iend
2626 aa( ioff ) = a( i, j )
2629 $ aa( ioff ) = rogue
double precision function dbeg(RESET)