134 SUBROUTINE slqt03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
142 INTEGER K, LDA, LWORK, M, N
145 REAL AF( LDA, * ), C( LDA, * ), CC( LDA, * ),
146 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
154 parameter( one = 1.0e0 )
156 parameter( rogue = -1.0e+10 )
159 CHARACTER SIDE, TRANS
160 INTEGER INFO, ISIDE, ITRANS, J, MC, NC
161 REAL CNORM, EPS, RESID
166 EXTERNAL lsame, slamch, slange
181 COMMON / srnamc / srnamt
184 DATA iseed / 1988, 1989, 1990, 1991 /
188 eps = slamch(
'Epsilon' )
192 CALL slaset(
'Full', n, n, rogue, rogue, q, lda )
193 CALL slacpy(
'Upper', k, n-1, af( 1, 2 ), lda, q( 1, 2 ), lda )
198 CALL sorglq( n, n, k, q, lda, tau, work, lwork, info )
201 IF( iside.EQ.1 )
THEN
214 CALL slarnv( 2, iseed, mc, c( 1, j ) )
216 cnorm = slange(
'1', mc, nc, c, lda, rwork )
221 IF( itrans.EQ.1 )
THEN
229 CALL slacpy(
'Full', mc, nc, c, lda, cc, lda )
234 CALL sormlq( side, trans, mc, nc, k, af, lda, tau, cc, lda,
235 $ work, lwork, info )
239 IF( lsame( side,
'L' ) )
THEN
240 CALL sgemm( trans,
'No transpose', mc, nc, mc, -one, q,
241 $ lda, c, lda, one, cc, lda )
243 CALL sgemm(
'No transpose', trans, mc, nc, nc, -one, c,
244 $ lda, q, lda, one, cc, lda )
249 resid = slange(
'1', mc, nc, cc, lda, rwork )
250 result( ( iside-1 )*2+itrans ) = resid /
251 $ ( real( max( 1, n ) )*cnorm*eps )
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slarnv(idist, iseed, n, x)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine slaset(uplo, m, n, alpha, beta, a, lda)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
subroutine sorglq(m, n, k, a, lda, tau, work, lwork, info)
SORGLQ
subroutine sormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMLQ
subroutine slqt03(m, n, k, af, c, cc, q, lda, tau, work, lwork, rwork, result)
SLQT03