DLAQP3RK(3)
π DLAQP3RK(3) β Library Functions Manual π
okay bestie, this is DLAQP3RK(3) from the Library Functions Manual. It's the LAPACK routine that computes a step of truncated QR factorization with column pivoting of a real m-by-n matrix A using Level 3 BLAS, and overwrites a real m-by-nrhs matrix B with Q**T * B. The source file is /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlaqp3rk.f.
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlaqp3rk.f
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine DLAQP3RK (m, n, nrhs, ioffset, nb, abstol, reltol, kp1, maxc2nrm, a, lda, done, kb, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2, auxv, f, ldf, iwork, info)β DLAQP3RK computes a step of truncated QR factorization with column pivoting of a realm-by-nmatrixAusing Level 3 BLAS and overwrites a realm-by-nrhsmatrixBwithQ**T * B.
π Function/Subroutine Documentation π
subroutine DLAQP3RK (...)
subroutine DLAQP3RK (integer m, integer n, integer nrhs, integer ioffset,
integer nb, double precision abstol, double precision reltol, integer
kp1, double precision maxc2nrm, double precision, dimension( lda, * ) a,
integer lda, logical done, integer kb, double precision maxc2nrmk,
double precision relmaxc2nrmk, integer, dimension( * ) jpiv, double
precision, dimension( * ) tau, double precision, dimension( * ) vn1,
double precision, dimension( * ) vn2, double precision, dimension( * )
auxv, double precision, dimension( ldf, * ) f, integer ldf, integer,
dimension( * ) iwork, integer info)
DLAQP3RK computes a step of truncated QR factorization with column pivoting of a real m-by-n matrix A using Level 3 BLAS and overwrites a real m-by-nrhs matrix B with Q**T * B.
π― Purpose π―
DLAQP3RK computes a step of truncated QR factorization with column pivoting of a real M-by-N matrix A block A(IOFFSET+1:M,1:N) by using Level 3 BLAS as
A * P(KB) = Q(KB) * R(KB).
The routine tries to factorize NB columns from A starting from the row IOFFSET+1 and updates the residual matrix with BLAS 3 xGEMM. The returned number of actually factorized columns is smaller than NB.
Block A(1:IOFFSET,1:N) is accordingly pivoted, but not factorized.
The routine also overwrites the right-hand-sides B matrix stored in A(IOFFSET+1:M,1:N+1:N+NRHS) with Q(KB)**T * B.
Cases when the number of factorized columns KB < NB:
- In some cases, due to catastrophic cancellations, it cannot factorize all
NBcolumns and needs to update the residual matrix. Hence, the actual number of factorized columns in the block returned inKBis smaller thanNB. The logicalDONEis returned asFALSE. The factorization of the whole original matrixA_origmust proceed with the next block. - Whenever the stopping criterion
ABSTOLorRELTOLis satisfied, the factorization of the whole original matrixA_origis stopped, the logicalDONEis returned asTRUE. The number of factorized columns which is smaller thanNBis returned inKB. - In case both stopping criteria
ABSTOLorRELTOLare not used, and when the residual matrix is a zero matrix in some factorization stepKB, the factorization of the whole original matrixA_origis stopped, the logicalDONEis returned asTRUE. The number of factorized columns which is smaller thanNBis returned inKB. - Whenever
NaNis detected in the matrixAor in the arrayTAU, the factorization of the whole original matrixA_origis stopped, the logicalDONEis returned asTRUE. The number of factorized columns which is smaller thanNBis returned inKB. TheINFOparameter is set to the column index of the firstNaNoccurrence.
π§Ύ Parameters π§Ύ
MβMis INTEGER. The number of rows of the matrixA.M >= 0.NβNis INTEGER. The number of columns of the matrixA.N >= 0.NRHSβNRHSis INTEGER. The number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.IOFFSETβIOFFSETis INTEGER. The number of rows of the matrixAthat must be pivoted but not factorized.IOFFSET >= 0.
IOFFSET also represents the number of columns of the whole original matrix A_orig that have been factorized in the previous steps.
NBβNBis INTEGER. Factorization block size, i.e the number of columns to factorize in the matrixA.0 <= NB.
If NB = 0, then the routine exits immediately. This means that the factorization is not performed, the matrices A and B and the arrays TAU, IPIV are not modified.
ABSTOLβABSTOLis DOUBLE PRECISION, cannot be NaN.
The absolute tolerance (stopping threshold) for maximum column 2-norm of the residual matrix. The algorithm converges (stops the factorization) when the maximum column 2-norm of the residual matrix is less than or equal to ABSTOL.
- a) If
ABSTOL < 0.0, then this stopping criterion is not used, the routine factorizes columns depending onNBandRELTOL. This includes the caseABSTOL = -Inf. - b) If
0.0 <= ABSTOLthen the input value ofABSTOLis used.
RELTOLβRELTOLis DOUBLE PRECISION, cannot be NaN.
The tolerance (stopping threshold) for the ratio of the maximum column 2-norm of the residual matrix to the maximum column 2-norm of the original matrix A_orig. The algorithm converges (stops the factorization), when this ratio is less than or equal to RELTOL.
- a) If
RELTOL < 0.0, then this stopping criterion is not used, the routine factorizes columns depending onNBandABSTOL. This includes the caseRELTOL = -Inf. - d) If
0.0 <= RELTOLthen the input value ofRELTOLis used.
KP1βKP1is INTEGER. The index of the column with the maximum 2-norm in the whole original matrixA_origdetermined in the main routineDGEQP3RK.1 <= KP1 <= N_orig.MAXC2NRMβMAXC2NRMis DOUBLE PRECISION. The maximum column 2-norm of the whole original matrixA_origcomputed in the main routineDGEQP3RK.MAXC2NRM >= 0.AβAis DOUBLE PRECISION array, dimension(LDA,N+NRHS).
On entry: the M-by-N matrix A and M-by-NRHS matrix B, as in
N NRHS
array_A = M [ mat_A, mat_B ]
On exit:
- The elements in block
A(IOFFSET+1:M,1:KB)below the diagonal together with the arrayTAUrepresent the orthogonal matrixQ(KB)as a product of elementary reflectors. - The upper triangular block of the matrix
Astored inA(IOFFSET+1:M,1:KB)is the triangular factor obtained. - The block of the matrix
Astored inA(1:IOFFSET,1:N)has been accordingly pivoted, but not factorized. - The rest of the array
A, blockA(IOFFSET+1:M,KB+1:N+NRHS). The left partA(IOFFSET+1:M,KB+1:N)of this block contains the residual of the matrixA, and, ifNRHS > 0, the right part of the blockA(IOFFSET+1:M,N+1:N+NRHS)contains the block of the right-hand-side matrixB. Both these blocks have been updated by multiplication from the left byQ(KB)**T.
LDAβLDAis INTEGER. The leading dimension of the arrayA.LDA >= max(1,M).DONEβDONEis LOGICAL.
TRUE:
- a) if the factorization completed before processing all
min(M-IOFFSET,NB,N)columns due toABSTOLorRELTOLcriterion, - b) if the factorization completed before processing all
min(M-IOFFSET,NB,N)columns due to the residual matrix being aZEROmatrix. - c) when
NaNwas detected in the matrixAor in the arrayTAU.
FALSE: otherwise.
π§Ύ Parameters π§Ύ
KBβKBis INTEGER. Factorization rank of the matrixA, i.e. the rank of the factorR, which is the same as the number of non-zero rows of the factorR.0 <= KB <= min(M-IOFFSET,NB,N).
KB also represents the number of non-zero Householder vectors.
MAXC2NRMKβMAXC2NRMKis DOUBLE PRECISION. The maximum column 2-norm of the residual matrix, when the factorization stopped at rankKB.MAXC2NRMK >= 0.RELMAXC2NRMKβRELMAXC2NRMKis DOUBLE PRECISION. The ratioMAXC2NRMK / MAXC2NRMof the maximum column 2-norm of the residual matrix (when the factorization stopped at rankKB) to the maximum column 2-norm of the original matrixA_orig.RELMAXC2NRMK >= 0.JPIVβJPIVis INTEGER array, dimension(N). Column pivot indices, for1 <= j <= N, columnjof the matrixAwas interchanged with columnJPIV(j).TAUβTAUis DOUBLE PRECISION array, dimension(min(M-IOFFSET,N)). The scalar factors of the elementary reflectors.VN1βVN1is DOUBLE PRECISION array, dimension(N). The vector with the partial column norms.VN2βVN2is DOUBLE PRECISION array, dimension(N). The vector with the exact column norms.AUXVβ the description is coming in part 2, bestie π«Ά
Okay bestie, we're still cooking through the argument list β these are the last few and they matter, so don't scroll past them π
AUXVβDOUBLE PRECISION array, dimension (NB). It's the auxiliary vector. π«ΆFβDOUBLE PRECISION array, dimension (LDF,NB). This is the matrixF**T = L*(Y**T)*A. β¨LDFβINTEGER. It's the leading dimension of the arrayF, and it has to obeyLDF >= max(1,N+NRHS). No cap. πIWORKβINTEGER array, dimension (N-1). It's a work array. (IWORKis used to store indices of columns for norm downdating in the residual matrix.) π¦INFOβINTEGER. This is the vibe check, and here's the whole rundown:INFO = 0: successful exit. We love a clean slay. β- If
INFO = j_1, where1 <= j_1 <= N, then NaN was detected and the routine stops the computation. Thej_1-th column of the matrixAor thej_1-th element of arrayTAUcontains the first occurrence of NaN in the factorization stepKB+1(whenKBcolumns have been factorized).- On exit:
KBis set to the number of factorized columns without exception.MAXC2NRMKis set to NaN.RELMAXC2NRMKis set to NaN.TAU(KB+1:min(M,N))is not set and contains undefined elements. Ifj_1=KB+1,TAU(KB+1)may contain NaN.
- If
INFO = j_2, whereN+1 <= j_2 <= 2*N, then no NaN was detected, but+Inf(or-Inf) was detected and the routine continues the computation until completion. The(j_2-N)-th column of the matrixAcontains the first occurrence of+Inf(or-Inf) in the factorization stepKB+1(whenKBcolumns have been factorized).
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π References π
- [1] A Level 3 BLAS QR factorization algorithm with column pivoting developed in 1996. G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain. X. Sun, Computer Science Dept., Duke University, USA. C. H. Bischof, Math. and Comp. Sci. Div., Argonne National Lab, USA. A BLAS-3 version of the QR factorization with column pivoting. LAPACK Working Note 114 and in SIAM J. Sci. Comput., 19(5):1486-1494, Sept. 1998.
- [2] A partial column norm updating strategy developed in 2006. Z. Drmac and Z. Bujanovic, Dept. of Math., University of Zagreb, Croatia. On the failure of rank revealing QR factorization software β a case study. LAPACK Working Note 176. and in ACM Trans. Math. Softw. 35, 2, Article 12 (July 2008), 28 pages.
π«Ά Contributors π«Ά
These contributors are literally iconic for this one, no cap:
!>
!> November 2023, Igor Kozachenko, James Demmel,
!> EECS Department,
!> University of California, Berkeley, USA.
!>
!>
π Definition at line 398 of file dlaqp3rk.f.
π That's the whole page, bestie! It got auto-generated by Doxygen for LAPACK straight from the source code β that's LAPACK Version 3.12.0, from /home/abui.../dlaqp3rk.f(3). Mwah! πβ¨
π¦ 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