112 SUBROUTINE zhpgst( ITYPE, UPLO, N, AP, BP, INFO )
120 INTEGER INFO, ITYPE, N
123 COMPLEX*16 AP( * ), BP( * )
129 DOUBLE PRECISION ONE, HALF
130 parameter( one = 1.0d+0, half = 0.5d+0 )
132 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
136 INTEGER J, J1, J1J1, JJ, K, K1, K1K1, KK
137 DOUBLE PRECISION AJJ, AKK, BJJ, BKK
150 EXTERNAL lsame, zdotc
157 upper = lsame( uplo,
'U' )
158 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
160 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
162 ELSE IF( n.LT.0 )
THEN
166 CALL xerbla(
'ZHPGST', -info )
170 IF( itype.EQ.1 )
THEN
184 ap( jj ) = dble( ap( jj ) )
185 bjj = dble( bp( jj ) )
186 CALL ztpsv( uplo,
'Conjugate transpose',
'Non-unit', j,
188 CALL zhpmv( uplo, j-1, -cone, ap, bp( j1 ), 1, cone,
190 CALL zdscal( j-1, one / bjj, ap( j1 ), 1 )
191 ap( jj ) = ( ap( jj )-zdotc( j-1, ap( j1 ), 1, bp( j1 ),
202 k1k1 = kk + n - k + 1
206 akk = dble( ap( kk ) )
207 bkk = dble( bp( kk ) )
211 CALL zdscal( n-k, one / bkk, ap( kk+1 ), 1 )
213 CALL zaxpy( n-k, ct, bp( kk+1 ), 1, ap( kk+1 ), 1 )
214 CALL zhpr2( uplo, n-k, -cone, ap( kk+1 ), 1,
215 $ bp( kk+1 ), 1, ap( k1k1 ) )
216 CALL zaxpy( n-k, ct, bp( kk+1 ), 1, ap( kk+1 ), 1 )
217 CALL ztpsv( uplo,
'No transpose',
'Non-unit', n-k,
218 $ bp( k1k1 ), ap( kk+1 ), 1 )
237 akk = dble( ap( kk ) )
238 bkk = dble( bp( kk ) )
239 CALL ztpmv( uplo,
'No transpose',
'Non-unit', k-1, bp,
242 CALL zaxpy( k-1, ct, bp( k1 ), 1, ap( k1 ), 1 )
243 CALL zhpr2( uplo, k-1, cone, ap( k1 ), 1, bp( k1 ), 1,
245 CALL zaxpy( k-1, ct, bp( k1 ), 1, ap( k1 ), 1 )
246 CALL zdscal( k-1, bkk, ap( k1 ), 1 )
247 ap( kk ) = akk*bkk**2
257 j1j1 = jj + n - j + 1
261 ajj = dble( ap( jj ) )
262 bjj = dble( bp( jj ) )
263 ap( jj ) = ajj*bjj + zdotc( n-j, ap( jj+1 ), 1,
265 CALL zdscal( n-j, bjj, ap( jj+1 ), 1 )
266 CALL zhpmv( uplo, n-j, cone, ap( j1j1 ), bp( jj+1 ), 1,
267 $ cone, ap( jj+1 ), 1 )
268 CALL ztpmv( uplo,
'Conjugate transpose',
'Non-unit',
269 $ n-j+1, bp( jj ), ap( jj ), 1 )
subroutine xerbla(srname, info)
subroutine zaxpy(n, za, zx, incx, zy, incy)
ZAXPY
subroutine zhpgst(itype, uplo, n, ap, bp, info)
ZHPGST
subroutine zhpmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
ZHPMV
subroutine zhpr2(uplo, n, alpha, x, incx, y, incy, ap)
ZHPR2
subroutine zdscal(n, da, zx, incx)
ZDSCAL
subroutine ztpmv(uplo, trans, diag, n, ap, x, incx)
ZTPMV
subroutine ztpsv(uplo, trans, diag, n, ap, x, incx)
ZTPSV