134 SUBROUTINE sqlt03( 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( zero = 0.0e0, one = 1.0e0 )
156 parameter( rogue = -1.0e+10 )
159 CHARACTER SIDE, TRANS
160 INTEGER INFO, ISIDE, ITRANS, J, MC, MINMN, NC
161 REAL CNORM, EPS, RESID
166 EXTERNAL lsame, slamch, slange
175 INTRINSIC max, min, real
181 COMMON / srnamc / srnamt
184 DATA iseed / 1988, 1989, 1990, 1991 /
188 eps = slamch(
'Epsilon' )
193 IF( minmn.EQ.0 )
THEN
203 CALL slaset(
'Full', m, m, rogue, rogue, q, lda )
204 IF( k.GT.0 .AND. m.GT.k )
205 $
CALL slacpy(
'Full', m-k, k, af( 1, n-k+1 ), lda,
206 $ q( 1, m-k+1 ), lda )
208 $
CALL slacpy(
'Upper', k-1, k-1, af( m-k+1, n-k+2 ), lda,
209 $ q( m-k+1, m-k+2 ), lda )
214 CALL sorgql( m, m, k, q, lda, tau( minmn-k+1 ), work, lwork,
218 IF( iside.EQ.1 )
THEN
231 CALL slarnv( 2, iseed, mc, c( 1, j ) )
233 cnorm = slange(
'1', mc, nc, c, lda, rwork )
238 IF( itrans.EQ.1 )
THEN
246 CALL slacpy(
'Full', mc, nc, c, lda, cc, lda )
252 $
CALL sormql( side, trans, mc, nc, k, af( 1, n-k+1 ), lda,
253 $ tau( minmn-k+1 ), cc, lda, work, lwork,
258 IF( lsame( side,
'L' ) )
THEN
259 CALL sgemm( trans,
'No transpose', mc, nc, mc, -one, q,
260 $ lda, c, lda, one, cc, lda )
262 CALL sgemm(
'No transpose', trans, mc, nc, nc, -one, c,
263 $ lda, q, lda, one, cc, lda )
268 resid = slange(
'1', mc, nc, cc, lda, rwork )
269 result( ( iside-1 )*2+itrans ) = resid /
270 $ ( real( max( 1, m ) )*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 sorgql(m, n, k, a, lda, tau, work, lwork, info)
SORGQL
subroutine sormql(side, trans, m, n, k, a, lda, tau, c, ldc, work, lwork, info)
SORMQL
subroutine sqlt03(m, n, k, af, c, cc, q, lda, tau, work, lwork, rwork, result)
SQLT03