136 SUBROUTINE srqt03( M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK,
145 INTEGER K, LDA, LWORK, M, N
148 REAL AF( lda, * ), C( lda, * ), CC( lda, * ),
149 $ q( lda, * ), result( * ), rwork( * ), tau( * ),
157 parameter ( zero = 0.0e0, one = 1.0e0 )
159 parameter ( rogue = -1.0e+10 )
162 CHARACTER SIDE, TRANS
163 INTEGER INFO, ISIDE, ITRANS, J, MC, MINMN, NC
164 REAL CNORM, EPS, RESID
169 EXTERNAL lsame, slamch, slange
178 INTRINSIC max, min, real
184 COMMON / srnamc / srnamt
187 DATA iseed / 1988, 1989, 1990, 1991 /
191 eps = slamch(
'Epsilon' )
196 IF( minmn.EQ.0 )
THEN
206 CALL slaset(
'Full', n, n, rogue, rogue, q, lda )
207 IF( k.GT.0 .AND. n.GT.k )
208 $
CALL slacpy(
'Full', k, n-k, af( m-k+1, 1 ), lda,
209 $ q( n-k+1, 1 ), lda )
211 $
CALL slacpy(
'Lower', k-1, k-1, af( m-k+2, n-k+1 ), lda,
212 $ q( n-k+2, n-k+1 ), lda )
217 CALL sorgrq( n, n, k, q, lda, tau( minmn-k+1 ), work, lwork,
221 IF( iside.EQ.1 )
THEN
234 CALL slarnv( 2, iseed, mc, c( 1, j ) )
236 cnorm = slange(
'1', mc, nc, c, lda, rwork )
241 IF( itrans.EQ.1 )
THEN
249 CALL slacpy(
'Full', mc, nc, c, lda, cc, lda )
255 $
CALL sormrq( side, trans, mc, nc, k, af( m-k+1, 1 ), lda,
256 $ tau( minmn-k+1 ), cc, lda, work, lwork,
261 IF( lsame( side,
'L' ) )
THEN
262 CALL sgemm( trans,
'No transpose', mc, nc, mc, -one, q,
263 $ lda, c, lda, one, cc, lda )
265 CALL sgemm(
'No transpose', trans, mc, nc, nc, -one, c,
266 $ lda, q, lda, one, cc, lda )
271 resid = slange(
'1', mc, nc, cc, lda, rwork )
272 result( ( iside-1 )*2+itrans ) = resid /
273 $ (
REAL( MAX( 1, N ) )*cnorm*eps )
subroutine slarnv(IDIST, ISEED, N, X)
SLARNV returns a vector of random numbers from a uniform or normal distribution.
subroutine srqt03(M, N, K, AF, C, CC, Q, LDA, TAU, WORK, LWORK, RWORK, RESULT)
SRQT03
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 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 sormrq(SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
SORMRQ
subroutine sorgrq(M, N, K, A, LDA, TAU, WORK, LWORK, INFO)
SORGRQ