134 SUBROUTINE clqt03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
142 INTEGER K, LDA, LWORK, M, N
145 REAL RESULT( * ), RWORK( * )
146 COMPLEX AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
147 $ q( lda, * ), tau( * ), work( lwork )
154 parameter( zero = 0.0e+0, one = 1.0e+0 )
156 parameter( rogue = ( -1.0e+10, -1.0e+10 ) )
159 CHARACTER SIDE, TRANS
160 INTEGER INFO, ISIDE, ITRANS, J, MC, NC
161 REAL CNORM, EPS, RESID
166 EXTERNAL lsame, clange, slamch
175 INTRINSIC cmplx, max, real
181 COMMON / srnamc / srnamt
184 DATA iseed / 1988, 1989, 1990, 1991 /
188 eps = slamch(
'Epsilon' )
192 CALL claset(
'Full', n, n, rogue, rogue, q, lda )
193 CALL clacpy(
'Upper', k, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
198 CALL cunglq( n, n, k, q, lda, tau, work, lwork, info )
201 IF( iside.EQ.1 )
THEN
214 CALL clarnv( 2, iseed, mc, c( 1, j ) )
216 cnorm = clange(
'1', mc, nc, c, lda, rwork )
221 IF( itrans.EQ.1 )
THEN
229 CALL clacpy(
'Full', mc, nc, c, lda, cc, lda )
234 CALL cunmlq( side, trans, mc, nc, k, af, lda, tau, cc, lda,
235 $ work, lwork, info )
239 IF( lsame( side,
'L' ) )
THEN
240 CALL cgemm( trans,
'No transpose', mc, nc, mc,
241 $ cmplx( -one ), q, lda, c, lda, cmplx( one ),
244 CALL cgemm(
'No transpose', trans, mc, nc, nc,
245 $ cmplx( -one ), c, lda, q, lda, cmplx( one ),
251 resid = clange(
'1', mc, nc, cc, lda, rwork )
252 result( ( iside-1 )*2+itrans ) = resid /
253 $ ( real( max( 1, n ) )*cnorm*eps )
subroutine clqt03(m, n, k, af, c, cc, q, lda, tau, work, lwork, rwork, result)
CLQT03
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine clarnv(idist, iseed, n, x)
CLARNV returns a vector of random numbers from a uniform or normal distribution.
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 cunglq(m, n, k, a, lda, tau, work, lwork, info)
CUNGLQ
subroutine cunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
CUNMLQ