 LAPACK  3.8.0 LAPACK: Linear Algebra PACKage

## ◆ sgemlqt()

 subroutine sgemlqt ( character SIDE, character TRANS, integer M, integer N, integer K, integer MB, real, dimension( ldv, * ) V, integer LDV, real, dimension( ldt, * ) T, integer LDT, real, dimension( ldc, * ) C, integer LDC, real, dimension( * ) WORK, integer INFO )
Purpose:

DGEMLQT overwrites the general real M-by-N matrix C with

SIDE = 'L' SIDE = 'R' TRANS = 'N': Q C C Q TRANS = 'T': Q**T C C Q**T

where Q is a real orthogonal matrix defined as the product of K elementary reflectors:

Q = H(1) H(2) . . . H(K) = I - V T V**T

generated using the compact WY representation as returned by DGELQT.

Q is of order M if SIDE = 'L' and of order N if SIDE = 'R'.

Parameters
 [in] SIDE ``` SIDE is CHARACTER*1 = 'L': apply Q or Q**T from the Left; = 'R': apply Q or Q**T from the Right.``` [in] TRANS ``` TRANS is CHARACTER*1 = 'N': No transpose, apply Q; = 'C': Transpose, apply Q**T.``` [in] M ``` M is INTEGER The number of rows of the matrix C. M >= 0.``` [in] N ``` N is INTEGER The number of columns of the matrix C. N >= 0.``` [in] K ``` K is INTEGER The number of elementary reflectors whose product defines the matrix Q. If SIDE = 'L', M >= K >= 0; if SIDE = 'R', N >= K >= 0.``` [in] MB ``` MB is INTEGER The block size used for the storage of T. K >= MB >= 1. This must be the same value of MB used to generate T in DGELQT.``` [in] V ``` V is REAL array, dimension (LDV,M) if SIDE = 'L', (LDV,N) if SIDE = 'R' The i-th row must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by DGELQT in the first K rows of its array argument A.``` [in] LDV ``` LDV is INTEGER The leading dimension of the array V. LDV >= max(1,K).``` [in] T ``` T is REAL array, dimension (LDT,K) The upper triangular factors of the block reflectors as returned by DGELQT, stored as a MB-by-K matrix.``` [in] LDT ``` LDT is INTEGER The leading dimension of the array T. LDT >= MB.``` [in,out] C ``` C is REAL array, dimension (LDC,N) On entry, the M-by-N matrix C. On exit, C is overwritten by Q C, Q**T C, C Q**T or C Q.``` [in] LDC ``` LDC is INTEGER The leading dimension of the array C. LDC >= max(1,M).``` [out] WORK ``` WORK is REAL array. The dimension of WORK is N*MB if SIDE = 'L', or M*MB if SIDE = 'R'.``` [out] INFO ``` INFO is INTEGER = 0: successful exit < 0: if INFO = -i, the i-th argument had an illegal value```
Date
November 2017

Definition at line 153 of file sgemlqt.f.

153 *
154 * -- LAPACK computational routine (version 3.8.0) --
155 * -- LAPACK is a software package provided by Univ. of Tennessee, --
156 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
157 * November 2017
158 *
159 * .. Scalar Arguments ..
160  CHARACTER side, trans
161  INTEGER info, k, ldv, ldc, m, n, mb, ldt
162 * ..
163 * .. Array Arguments ..
164  REAL v( ldv, * ), c( ldc, * ), t( ldt, * ), work( * )
165 * ..
166 *
167 * =====================================================================
168 *
169 * ..
170 * .. Local Scalars ..
171  LOGICAL left, right, tran, notran
172  INTEGER i, ib, ldwork, kf
173 * ..
174 * .. External Functions ..
175  LOGICAL lsame
176  EXTERNAL lsame
177 * ..
178 * .. External Subroutines ..
179  EXTERNAL xerbla, slarfb
180 * ..
181 * .. Intrinsic Functions ..
182  INTRINSIC max, min
183 * ..
184 * .. Executable Statements ..
185 *
186 * .. Test the input arguments ..
187 *
188  info = 0
189  left = lsame( side, 'L' )
190  right = lsame( side, 'R' )
191  tran = lsame( trans, 'T' )
192  notran = lsame( trans, 'N' )
193 *
194  IF( left ) THEN
195  ldwork = max( 1, n )
196  ELSE IF ( right ) THEN
197  ldwork = max( 1, m )
198  END IF
199  IF( .NOT.left .AND. .NOT.right ) THEN
200  info = -1
201  ELSE IF( .NOT.tran .AND. .NOT.notran ) THEN
202  info = -2
203  ELSE IF( m.LT.0 ) THEN
204  info = -3
205  ELSE IF( n.LT.0 ) THEN
206  info = -4
207  ELSE IF( k.LT.0) THEN
208  info = -5
209  ELSE IF( mb.LT.1 .OR. (mb.GT.k .AND. k.GT.0)) THEN
210  info = -6
211  ELSE IF( ldv.LT.max( 1, k ) ) THEN
212  info = -8
213  ELSE IF( ldt.LT.mb ) THEN
214  info = -10
215  ELSE IF( ldc.LT.max( 1, m ) ) THEN
216  info = -12
217  END IF
218 *
219  IF( info.NE.0 ) THEN
220  CALL xerbla( 'SGEMLQT', -info )
221  RETURN
222  END IF
223 *
224 * .. Quick return if possible ..
225 *
226  IF( m.EQ.0 .OR. n.EQ.0 .OR. k.EQ.0 ) RETURN
227 *
228  IF( left .AND. notran ) THEN
229 *
230  DO i = 1, k, mb
231  ib = min( mb, k-i+1 )
232  CALL slarfb( 'L', 'T', 'F', 'R', m-i+1, n, ib,
233  \$ v( i, i ), ldv, t( 1, i ), ldt,
234  \$ c( i, 1 ), ldc, work, ldwork )
235  END DO
236 *
237  ELSE IF( right .AND. tran ) THEN
238 *
239  DO i = 1, k, mb
240  ib = min( mb, k-i+1 )
241  CALL slarfb( 'R', 'N', 'F', 'R', m, n-i+1, ib,
242  \$ v( i, i ), ldv, t( 1, i ), ldt,
243  \$ c( 1, i ), ldc, work, ldwork )
244  END DO
245 *
246  ELSE IF( left .AND. tran ) THEN
247 *
248  kf = ((k-1)/mb)*mb+1
249  DO i = kf, 1, -mb
250  ib = min( mb, k-i+1 )
251  CALL slarfb( 'L', 'N', 'F', 'R', m-i+1, n, ib,
252  \$ v( i, i ), ldv, t( 1, i ), ldt,
253  \$ c( i, 1 ), ldc, work, ldwork )
254  END DO
255 *
256  ELSE IF( right .AND. notran ) THEN
257 *
258  kf = ((k-1)/mb)*mb+1
259  DO i = kf, 1, -mb
260  ib = min( mb, k-i+1 )
261  CALL slarfb( 'R', 'T', 'F', 'R', m, n-i+1, ib,
262  \$ v( i, i ), ldv, t( 1, i ), ldt,
263  \$ c( 1, i ), ldc, work, ldwork )
264  END DO
265 *
266  END IF
267 *
268  RETURN
269 *
270 * End of SGEMLQT
271 *
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.
Definition: slarfb.f:197
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
Here is the call graph for this function:
Here is the caller graph for this function: