137 SUBROUTINE sgeqlf( M, N, A, LDA, TAU, WORK, LWORK, INFO )
144 INTEGER INFO, LDA, LWORK, M, N
147 REAL A( LDA, * ), TAU( * ), WORK( * )
154 INTEGER I, IB, IINFO, IWS, K, KI, KK, LDWORK, LWKOPT,
155 $ MU, NB, NBMIN, NU, NX
166 EXTERNAL ilaenv, sroundup_lwork
173 lquery = ( lwork.EQ.-1 )
176 ELSE IF( n.LT.0 )
THEN
178 ELSE IF( lda.LT.max( 1, m ) )
THEN
187 nb = ilaenv( 1,
'SGEQLF',
' ', m, n, -1, -1 )
190 work( 1 ) = sroundup_lwork(lwkopt)
192 IF( lwork.LT.max( 1, n ) .AND. .NOT.lquery )
THEN
198 CALL xerbla(
'SGEQLF', -info )
200 ELSE IF( lquery )
THEN
213 IF( nb.GT.1 .AND. nb.LT.k )
THEN
217 nx = max( 0, ilaenv( 3,
'SGEQLF',
' ', m, n, -1, -1 ) )
224 IF( lwork.LT.iws )
THEN
230 nbmin = max( 2, ilaenv( 2,
'SGEQLF',
' ', m, n, -1,
236 IF( nb.GE.nbmin .AND. nb.LT.k .AND. nx.LT.k )
THEN
241 ki = ( ( k-nx-1 ) / nb )*nb
244 DO 10 i = k - kk + ki + 1, k - kk + 1, -nb
245 ib = min( k-i+1, nb )
250 CALL sgeql2( m-k+i+ib-1, ib, a( 1, n-k+i ), lda, tau( i ),
252 IF( n-k+i.GT.1 )
THEN
257 CALL slarft(
'Backward',
'Columnwise', m-k+i+ib-1, ib,
258 $ a( 1, n-k+i ), lda, tau( i ), work, ldwork )
262 CALL slarfb(
'Left',
'Transpose',
'Backward',
263 $
'Columnwise', m-k+i+ib-1, n-k+i-1, ib,
264 $ a( 1, n-k+i ), lda, work, ldwork, a, lda,
265 $ work( ib+1 ), ldwork )
268 mu = m - k + i + nb - 1
269 nu = n - k + i + nb - 1
277 IF( mu.GT.0 .AND. nu.GT.0 )
278 $
CALL sgeql2( mu, nu, a, lda, tau, work, iinfo )
280 work( 1 ) = sroundup_lwork(iws)
subroutine xerbla(srname, info)
subroutine sgeql2(m, n, a, lda, tau, work, info)
SGEQL2 computes the QL factorization of a general rectangular matrix using an unblocked algorithm.
subroutine sgeqlf(m, n, a, lda, tau, work, lwork, info)
SGEQLF
subroutine slarfb(side, trans, direct, storev, m, n, k, v, ldv, t, ldt, c, ldc, work, ldwork)
SLARFB applies a block reflector or its transpose to a general rectangular matrix.
subroutine slarft(direct, storev, n, k, v, ldv, tau, t, ldt)
SLARFT forms the triangular factor T of a block reflector H = I - vtvH