1 SUBROUTINE ztzscal( UPLO, M, N, IOFFD, ALPHA, A, LDA )
10 INTEGER IOFFD, LDA, M, N
14 COMPLEX*16 A( LDA, * )
107 parameter( one = ( 1.0d+0, 0.0d+0 ),
108 $ zero = ( 0.0d+0, 0.0d+0 ) )
127 IF( ( m.LE.0 ).OR.( n.LE.0 ).OR.( alpha.EQ.one ) )
132 IF( alpha.EQ.zero )
THEN
133 CALL ztzpad( uplo,
'N', m, n, ioffd, zero, zero, a, lda )
137 IF( lsame( uplo,
'L' ) )
THEN
141 mn =
max( 0, -ioffd )
142 DO 10 j = 1,
min( mn, n )
143 CALL zscal( m, alpha, a( 1, j ), 1 )
145 DO 20 j = mn + 1,
min( m - ioffd, n )
148 $
CALL zscal( m-jtmp+1, alpha, a( jtmp, j ), 1 )
151 ELSE IF( lsame( uplo,
'U' ) )
THEN
155 mn =
min( m - ioffd, n )
156 DO 30 j =
max( 0, -ioffd ) + 1, mn
157 CALL zscal( j + ioffd, alpha, a( 1, j ), 1 )
159 DO 40 j =
max( 0, mn ) + 1, n
160 CALL zscal( m, alpha, a( 1, j ), 1 )
163 ELSE IF( lsame( uplo,
'D' ) )
THEN
167 DO 50 j =
max( 0, -ioffd ) + 1,
min( m - ioffd, n )
169 a( jtmp, j ) = alpha * a( jtmp, j )
177 CALL zscal( m, alpha, a( 1, j ), 1 )