1 SUBROUTINE zhescal( UPLO, M, N, IOFFD, ALPHA, A, LDA )
10 INTEGER IOFFD, LDA, M, N
11 DOUBLE PRECISION ALPHA
14 COMPLEX*16 A( LDA, * )
108 DOUBLE PRECISION RONE, RZERO
109 parameter( rone = 1.0d+0, rzero = 0.0d+0 )
111 parameter( zero = ( 0.0d+0, 0.0d+0 ) )
124 INTRINSIC dble, dcmplx,
max,
min
130 IF( m.LE.0 .OR. n.LE.0 )
135 IF( alpha.EQ.rone )
THEN
139 IF( lsame( uplo,
'L' ).OR.lsame( uplo,
'U' ).OR.
140 $ lsame( uplo,
'D' ) )
THEN
141 DO 10 j =
max( 0, -ioffd ) + 1,
min( m - ioffd, n )
143 a( jtmp, j ) = dcmplx( dble( a( jtmp, j ) ), rzero )
147 ELSE IF( alpha.EQ.rzero )
THEN
148 CALL ztzpad( uplo,
'N', m, n, ioffd, zero, zero, a, lda )
152 IF( lsame( uplo,
'L' ) )
THEN
156 mn =
max( 0, -ioffd )
157 DO 20 j = 1,
min( mn, n )
158 CALL zdscal( m, alpha, a( 1, j ), 1 )
160 DO 30 j = mn + 1,
min( m - ioffd, n )
162 a( jtmp, j ) = dcmplx( alpha * dble( a( jtmp, j ) ), rzero )
164 $
CALL zdscal( m-jtmp, alpha, a( jtmp + 1, j ), 1 )
167 ELSE IF( lsame( uplo,
'U' ) )
THEN
171 mn =
min( m - ioffd, n )
172 DO 40 j =
max( 0, -ioffd ) + 1, mn
174 CALL zdscal( jtmp - 1, alpha, a( 1, j ), 1 )
175 a( jtmp, j ) = dcmplx( alpha * dble( a( jtmp, j ) ), rzero )
177 DO 50 j =
max( 0, mn ) + 1, n
178 CALL zdscal( m, alpha, a( 1, j ), 1 )
181 ELSE IF( lsame( uplo,
'D' ) )
THEN
185 DO 60 j =
max( 0, -ioffd ) + 1,
min( m - ioffd, n )
187 a( jtmp, j ) = dcmplx( alpha * dble( a( jtmp, j ) ), rzero )
195 CALL zdscal( m, alpha, a( 1, j ), 1 )