/home/abui...RC/sgelq.f(3)
π¦ SGELQ β sgelq.f(3) π¦
okay bestie so this is a page out of the LAPACK Library Functions Manual β¨ β the file itself lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sgelq.f, and ngl the whole thing is literally about one iconic lil subroutine. let's get into it π
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sgelq.f
like, that's the whole name. that's the file. it's giving "full government name" energy, no cap π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine SGELQ (m, n, a, lda, t, tsize, work, lwork, info)
SGELQ β that's her. that's the girl π
π Function/Subroutine Documentation π
subroutine SGELQ (integer m, integer n, real, dimension( lda, * ) a, integer
lda, real, dimension( * ) t, integer tsize, real, dimension( * ) work,
integer lwork, integer info)
SGELQ π«Ά
β Purpose β
okay so real talk β SGELQ computes an LQ factorization of a real M-by-N matrix A, and here's the whole glow-up:
A = ( L 0 ) * Q
where, and I need you to hear me on this:
- Q is a N-by-N orthogonal matrix;
- L is a lower-triangular M-by-M matrix;
- 0 is a M-by-(N-M) zero matrix, if M < N.
that's it. that's the factorization. she ate π₯
π Parameters π
MβM is INTEGER. the number of rows of the matrix A.M >= 0. zero rows? allowed. iconic of her.NβN is INTEGER. the number of columns of the matrix A.N >= 0. same deal, zero is a valid vibe.AβA is REAL array, dimension (LDA,N). on entry, the M-by-N matrix A. on exit, the elements on and below the diagonal of the array contain the M-by-min(M,N) lower trapezoidal matrix L (L is lower triangular ifM <= N); the elements above the diagonal are used to store part of the data structure to represent Q. so like, A is doing double duty, main character energy fr πLDAβLDA is INTEGER. the leading dimension of the array A.LDA >= max(1,M). respect the leading dimension bestie, it's not optional π«ΆTβT is REAL array, dimension (MAX(5,TSIZE)). on exit, ifINFO = 0,T(1)returns optimal (or either minimal or optimal, if query is assumed) TSIZE. see TSIZE for details. remaining T contains part of the data structure used to represent Q. if one wants to apply or construct Q, then one needs to keep T (in addition to A) and pass it to further subroutines. so don't throw T away, she's part of the friend group πTSIZEβTSIZE is INTEGER. here's the tea:- if
TSIZE >= 5, the dimension of the array T. - if
TSIZE = -1or-2, then a workspace query is assumed. the routine only calculates the sizes of the T and WORK arrays, returns these values as the first entries of the T and WORK arrays, and no error message related to T or WORK is issued by XERBLA. - if
TSIZE = -1, the routine calculates optimal size of T for the optimum performance and returns this value inT(1). - if
TSIZE = -2, the routine calculates minimal size of T and returns this value inT(1).
- if
WORKβ(workspace) REAL array, dimension (MAX(1,LWORK)). on exit, ifINFO = 0,WORK(1)contains optimal (or either minimal or optimal, if query was assumed) LWORK. see LWORK for details.LWORKβLWORK is INTEGER. the dimension of the array WORK.- if
LWORK = -1or-2, then a workspace query is assumed. the routine only calculates the sizes of the T and WORK arrays, returns these values as the first entries of the T and WORK arrays, and no error message related to T or WORK is issued by XERBLA. - if
LWORK = -1, the routine calculates optimal size of WORK for the optimal performance and returns this value inWORK(1). - if
LWORK = -2, the routine calculates minimal size of WORK and returns this value inWORK(1).
- if
INFOβINFO is INTEGER= 0: successful exit β¨ slay< 0: ifINFO = -i, the i-th argument had an illegal value π
π§ Author π§
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad collaborated on this one, we love a group project that actually worked π«Ά
π Further Details π
okay so the vision here:
the goal of the interface is to give maximum freedom to the developers for creating any LQ factorization algorithm they wish. the triangular (trapezoidal) L has to be stored in the lower part of A. the lower part of A and the array T can be used to store any relevant information for applying or constructing the Q factor. the WORK array can safely be discarded after exit.
β οΈ Caution: one should not expect the sizes of T and WORK to be the same from one LAPACK implementation to the other, or even from one execution to the other. a workspace query (for T and WORK) is needed at each execution. however, for a given execution, the size of T and WORK are fixed and will not change from one query to the next. so like... query every time. no shortcuts. i don't make the rules π
π Further Details particular to this LAPACK implementation π
these details are particular for this LAPACK implementation. users should not take them for granted β these details may change in the future, and are not likely true for another LAPACK implementation. these details are relevant if one wants to try to understand the code. they are not part of the interface.
in this version:
T(2): row block size (MB)
T(3): column block size (NB)
T(6:TSIZE): data structure needed for Q, computed by
SLASWLQ or SGELQT
depending on the matrix dimensions M and N, and row and column block sizes MB and NB returned by ILAENV, SGELQ will use either SLASWLQ (if the matrix is short-and-wide) or SGELQT to compute the LQ factorization.
short-and-wide? SLASWLQ. otherwise? SGELQT. she picks her outfit based on the occasion π
β¨
π Definition at line 172 of file sgelq.f. π
like, line 172. right there. go look π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. (yes she was auto-generated, but the personality is all hers π)
LAPACK β Version 3.12.0
and that's the page bestie!! go forth and factorize your LQ, keep your T, query your workspace every single time, and remember: you're doing amazing sweetie ππ¦β¨ππΈπ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms