134 SUBROUTINE dqrt03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
142 INTEGER K, LDA, LWORK, M, N
145 DOUBLE PRECISION AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
146 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
154 parameter( one = 1.0d0 )
155 DOUBLE PRECISION ROGUE
156 parameter( rogue = -1.0d+10 )
159 CHARACTER SIDE, TRANS
160 INTEGER INFO, ISIDE, ITRANS, J, MC, NC
161 DOUBLE PRECISION CNORM, EPS, RESID
165 DOUBLE PRECISION DLAMCH, DLANGE
166 EXTERNAL lsame, dlamch, dlange
181 COMMON / srnamc / srnamt
184 DATA iseed / 1988, 1989, 1990, 1991 /
188 eps = dlamch(
'Epsilon' )
192 CALL dlaset(
'Full', m, m, rogue, rogue, q, lda )
193 CALL dlacpy(
'Lower', m-1, k, af( 2, 1 ), lda, q( 2, 1 ), lda )
198 CALL dorgqr( m, m, k, q, lda, tau, work, lwork, info )
201 IF( iside.EQ.1 )
THEN
214 CALL dlarnv( 2, iseed, mc, c( 1, j ) )
216 cnorm = dlange(
'1', mc, nc, c, lda, rwork )
221 IF( itrans.EQ.1 )
THEN
229 CALL dlacpy(
'Full', mc, nc, c, lda, cc, lda )
234 CALL dormqr( side, trans, mc, nc, k, af, lda, tau, cc, lda,
235 $ work, lwork, info )
239 IF( lsame( side,
'L' ) )
THEN
240 CALL dgemm( trans,
'No transpose', mc, nc, mc, -one, q,
241 $ lda, c, lda, one, cc, lda )
243 CALL dgemm(
'No transpose', trans, mc, nc, nc, -one, c,
244 $ lda, q, lda, one, cc, lda )
249 resid = dlange(
'1', mc, nc, cc, lda, rwork )
250 result( ( iside-1 )*2+itrans ) = resid /
251 $ ( dble( max( 1, m ) )*cnorm*eps )
subroutine dqrt03(m, n, k, af, c, cc, q, lda, tau, work, lwork, rwork, result)
DQRT03
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlarnv(idist, iseed, n, x)
DLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
DLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine dorgqr(m, n, k, a, lda, tau, work, lwork, info)
DORGQR
subroutine dormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
DORMQR