1 SUBROUTINE ctzpad( UPLO, HERM, M, N, IOFFD, ALPHA, BETA, A, LDA )
10 INTEGER IOFFD, LDA, M, N
124 parameter( rzero = 0.0e+0 )
127 INTEGER I, J, JTMP, MN
140 IF( m.LE.0 .OR. n.LE.0 )
145 IF( lsame( uplo,
'L' ) )
THEN
151 mn =
max( 0, -ioffd )
152 DO 20 j = 1,
min( mn, n )
158 IF( lsame( herm,
'Z' ) )
THEN
159 DO 40 j = mn + 1,
min( m - ioffd, n )
161 a( jtmp, j ) =
cmplx( real( a( jtmp, j ) ), rzero )
162 DO 30 i = jtmp + 1, m
167 DO 60 j = mn + 1,
min( m - ioffd, n )
170 DO 50 i = jtmp + 1, m
176 ELSE IF( lsame( uplo,
'U' ) )
THEN
182 mn =
min( m - ioffd, n )
183 IF( lsame( herm,
'Z' ) )
THEN
184 DO 80 j =
max( 0, -ioffd ) + 1, mn
186 DO 70 i = 1, jtmp - 1
189 a( jtmp, j ) =
cmplx( real( a( jtmp, j ) ), rzero )
192 DO 100 j =
max( 0, -ioffd ) + 1, mn
194 DO 90 i = 1, jtmp - 1
200 DO 120 j =
max( 0, mn ) + 1, n
206 ELSE IF( lsame( uplo,
'D' ) )
THEN
211 IF( lsame( herm,
'Z' ) )
THEN
212 IF( ( ioffd.LT.m ).AND.( ioffd.GT.-n ) )
THEN
213 DO 130 j =
max( 0, -ioffd ) + 1,
min( m - ioffd, n )
215 a( jtmp, j ) =
cmplx( real( a( jtmp, j ) ), rzero )
219 IF( ( ioffd.LT.m ).AND.( ioffd.GT.-n ) )
THEN
220 DO 140 j =
max( 0, -ioffd ) + 1,
min( m - ioffd, n )
221 a( j + ioffd, j ) = beta
235 IF( alpha.NE.beta .AND. ioffd.LT.m .AND. ioffd.GT.-n )
THEN
236 DO 170 j =
max( 0, -ioffd ) + 1,
min( m - ioffd, n )
237 a( j + ioffd, j ) = beta