135 SUBROUTINE clqt02( M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK,
144 INTEGER K, LDA, LWORK, M, N
147 REAL RESULT( * ), RWORK( * )
148 COMPLEX A( lda, * ), AF( lda, * ), L( lda, * ),
149 $ q( lda, * ), tau( * ), work( lwork )
156 parameter ( zero = 0.0e+0, one = 1.0e+0 )
158 parameter ( rogue = ( -1.0e+10, -1.0e+10 ) )
162 REAL ANORM, EPS, RESID
165 REAL CLANGE, CLANSY, SLAMCH
166 EXTERNAL clange, clansy, slamch
172 INTRINSIC cmplx, max, real
178 COMMON / srnamc / srnamt
182 eps = slamch(
'Epsilon' )
186 CALL claset(
'Full', m, n, rogue, rogue, q, lda )
187 CALL clacpy(
'Upper', k, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
192 CALL cunglq( m, n, k, q, lda, tau, work, lwork, info )
196 CALL claset(
'Full', k, m, cmplx( zero ), cmplx( zero ), l, lda )
197 CALL clacpy(
'Lower', k, m, af, lda, l, lda )
201 CALL cgemm(
'No transpose',
'Conjugate transpose', k, m, n,
202 $ cmplx( -one ), a, lda, q, lda, cmplx( one ), l, lda )
206 anorm = clange(
'1', k, n, a, lda, rwork )
207 resid = clange(
'1', k, m, l, lda, rwork )
208 IF( anorm.GT.zero )
THEN
209 result( 1 ) = ( ( resid /
REAL( MAX( 1, N ) ) ) / anorm ) / eps
216 CALL claset(
'Full', m, m, cmplx( zero ), cmplx( one ), l, lda )
217 CALL cherk(
'Upper',
'No transpose', m, n, -one, q, lda, one, l,
222 resid = clansy(
'1',
'Upper', m, l, lda, rwork )
224 result( 2 ) = ( resid /
REAL( MAX( 1, N ) ) ) / eps
subroutine cherk(UPLO, TRANS, N, K, ALPHA, A, LDA, BETA, C, LDC)
CHERK
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
subroutine clqt02(M, N, K, A, AF, Q, L, LDA, TAU, WORK, LWORK, RWORK, RESULT)
CLQT02
subroutine cunglq(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
CUNGLQ
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM