150 SUBROUTINE zsgt01( ITYPE, UPLO, N, M, A, LDA, B, LDB, Z, LDZ, D,
151 $ WORK, RWORK, RESULT )
159 INTEGER ITYPE, LDA, LDB, LDZ, M, N
162 DOUBLE PRECISION D( * ), RESULT( * ), RWORK( * )
163 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
170 DOUBLE PRECISION ZERO, ONE
171 parameter( zero = 0.0d+0, one = 1.0d+0 )
172 COMPLEX*16 CZERO, CONE
173 parameter( czero = ( 0.0d+0, 0.0d+0 ),
174 $ cone = ( 1.0d+0, 0.0d+0 ) )
178 DOUBLE PRECISION ANORM, ULP
181 DOUBLE PRECISION DLAMCH, ZLANGE, ZLANHE
182 EXTERNAL dlamch, zlange, zlanhe
193 ulp = dlamch(
'Epsilon' )
197 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )*
198 $ zlange(
'1', n, m, z, ldz, rwork )
202 IF( itype.EQ.1 )
THEN
206 CALL zhemm(
'Left', uplo, n, m, cone, a, lda, z, ldz, czero,
209 CALL zdscal( n, d( i ), z( 1, i ), 1 )
211 CALL zhemm(
'Left', uplo, n, m, cone, b, ldb, z, ldz, -cone,
214 result( 1 ) = ( zlange(
'1', n, m, work, n, rwork ) / anorm ) /
217 ELSE IF( itype.EQ.2 )
THEN
221 CALL zhemm(
'Left', uplo, n, m, cone, b, ldb, z, ldz, czero,
224 CALL zdscal( n, d( i ), z( 1, i ), 1 )
226 CALL zhemm(
'Left', uplo, n, m, cone, a, lda, work, n, -cone,
229 result( 1 ) = ( zlange(
'1', n, m, z, ldz, rwork ) / anorm ) /
232 ELSE IF( itype.EQ.3 )
THEN
236 CALL zhemm(
'Left', uplo, n, m, cone, a, lda, z, ldz, czero,
239 CALL zdscal( n, d( i ), z( 1, i ), 1 )
241 CALL zhemm(
'Left', uplo, n, m, cone, b, ldb, work, n, -cone,
244 result( 1 ) = ( zlange(
'1', n, m, z, ldz, rwork ) / anorm ) /
subroutine zsgt01(itype, uplo, n, m, a, lda, b, ldb, z, ldz, d, work, rwork, result)
ZSGT01