1 SUBROUTINE chescal( UPLO, M, N, IOFFD, ALPHA, A, LDA )
10 INTEGER IOFFD, LDA, M, N
109 parameter( rone = 1.0e+0, rzero = 0.0e+0 )
111 parameter( zero = ( 0.0e+0, 0.0e+0 ) )
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 ) =
cmplx( real( a( jtmp, j ) ), rzero )
147 ELSE IF( alpha.EQ.rzero )
THEN
148 CALL ctzpad( 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 csscal( m, alpha, a( 1, j ), 1 )
160 DO 30 j = mn + 1,
min( m - ioffd, n )
162 a( jtmp, j ) =
cmplx( alpha * real( a( jtmp, j ) ), rzero )
164 $
CALL csscal( 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 csscal( jtmp - 1, alpha, a( 1, j ), 1 )
175 a( jtmp, j ) =
cmplx( alpha * real( a( jtmp, j ) ), rzero )
177 DO 50 j =
max( 0, mn ) + 1, n
178 CALL csscal( 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 ) =
cmplx( alpha * real( a( jtmp, j ) ), rzero )
195 CALL csscal( m, alpha, a( 1, j ), 1 )