SRC/zcgesv.f(3)
π NAME π
Okay so bestie, this page is SRC/zcgesv.f β and the manual name folded in near the top is SRC/zcgesv.f(3) from the Library Functions Manual. It's giving βlinear algebra but make it mixed precisionβ energy, and yes, we're doing the whole thing. π
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines πΈ
subroutine zcgesv (n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, rwork, iter, info)
ZCGESV computes the solution to system of linear equations A * X = B for GE matrices (mixed precision with iterative refinement) β no cap, that's the whole vibe. π
π«Ά Function/Subroutine Documentation π«Ά
π§ subroutine zcgesv
subroutine zcgesv (integer n, integer nrhs, complex*16, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, complex*16, dimension( ldb, * ) b, integer ldb, complex*16, dimension( ldx, * ) x, integer ldx, complex*16, dimension( n, * ) work, complex, dimension( * ) swork, double precision, dimension( * ) rwork, integer iter, integer info)
ZCGESV computes the solution to system of linear equations A * X = B for GE matrices (mixed precision with iterative refinement). Iconic. π
π¦ Purpose π¦
Okay so here's the agenda: ZCGESV computes the solution to a complex system of linear equations
A * X = B,
where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
First move: ZCGESV attempts to factorize the matrix in COMPLEX and use this factorization within an iterative refinement procedure to produce a solution with COMPLEX*16 normwise backward error quality (see below). If the approach fails, the method switches to a COMPLEX*16 factorization and solve.
The iterative refinement is not going to be a winning strategy if the ratio COMPLEX performance over COMPLEX*16 performance is too small. A reasonable strategy should take the number of right-hand sides and the size of the matrix into account. This might be done with a call to ILAENV in the future. Up to now, we always try iterative refinement.
The iterative refinement process is stopped if
ITER > ITERMAX
or for all the RHS we have:
RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX
where
ITERis the number of the current iteration in the iterative refinement processRNRMis the infinity-norm of the residualXNRMis the infinity-norm of the solutionANRMis the infinity-operator-norm of the matrixAEPSis the machine epsilon returned byDLAMCH('Epsilon')
The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00 respectively. Periodt. πβ¨
π Parameters π
NβNisINTEGER; the number of linear equations, i.e., the order of the matrixA.N >= 0.NRHSβNRHSisINTEGER; the number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.AβAisCOMPLEX*16 array,dimension (LDA,N). On entry, theN-by-Ncoefficient matrixA. On exit, if iterative refinement has been successfully used (INFO = 0andITER >= 0, see description below), thenAis unchanged. If double precision factorization has been used (INFO = 0andITER < 0, see description below), then the arrayAcontains the factorsLandUfrom the factorizationA = P*L*U; the unit diagonal elements ofLare not stored.LDAβLDAisINTEGER; the leading dimension of the arrayA.LDA >= max(1,N).IPIVβIPIVisINTEGER array, dimension(N). The pivot indices that define the permutation matrixP; rowiof the matrix was interchanged with rowIPIV(i). Corresponds either to the single precision factorization (ifINFO = 0andITER >= 0) or the double precision factorization (ifINFO = 0andITER < 0).BβBisCOMPLEX*16 array,dimension (LDB,NRHS). TheN-by-NRHSright hand side matrixB.LDBβLDBisINTEGER; the leading dimension of the arrayB.LDB >= max(1,N).XβXisCOMPLEX*16 array,dimension (LDX,NRHS). IfINFO = 0, theN-by-NRHSsolution matrixX.LDXβLDXisINTEGER; the leading dimension of the arrayX.LDX >= max(1,N).WORKβWORKisCOMPLEX*16 array,dimension (N,NRHS). This array is used to hold the residual vectors.SWORKβSWORKisCOMPLEX array,dimension (N*(N+NRHS)). This array is used to use the single precision matrix and the right-hand sides or solutions in single precision.RWORKβRWORKisDOUBLE PRECISION array,dimension (N).ITERβITERisINTEGER.< 0β iterative refinement has failed,COMPLEX*16factorization has been performed:-1: the routine fell back to full precision for implementation- or machine-specific reasons-2: narrowing the precision induced an overflow, the routine fell back to full precision-3: failure ofCGETRF-31: stop the iterative refinement after the 30th iterations
> 0β iterative refinement has been successfully used. Returns the number of iterations.
INFOβINFOisINTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,U(i,i)computed inCOMPLEX*16is exactly zero. The factorization has been completed, but the factorUis exactly singular, so the solution could not be computed.
π¨ bestie, thatU(i,i)exactly-zero situation is not a slay: the factorization is done, butUis exactly singular, so the solution could not be computed. π¨
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Definition at line 199 of file zcgesv.f. π
Definition at line 199 of file zcgesv.f.
πͺ Author (generated by Doxygen) πͺ
Generated automatically by Doxygen for LAPACK from the source code.
Cute sign-off, bestie: the footer is giving LAPACK Version 3.12.0 with source page SRC/zcgesv.f(3) β source/version noted, vibe check passed, mwah πβ¨
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms