CHPTRS(3)
β¨ NAME β¨
CHPTRS β the LAPACK hero that solves A*X = B when A is a complex Hermitian matrix stored in packed format, using the factorization A = U*D*U**H or A = L*D*L**H from CHPTRF π
Okay so this is LAPACK, bestie β the source file is chptrs.f, straight from the SRC directory of lapack-3.12.0. Letβs get into it π«Ά
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine CHPTRS (uplo, n, nrhs, ap, ipiv, b, ldb, info)β literally the function, periodt.
subroutine CHPTRS (uplo, n, nrhs, ap, ipiv, b, ldb, info)
π¦ Function/Subroutine Documentation π¦
subroutine CHPTRS (
character uplo,
integer n,
integer nrhs,
complex, dimension( * ) ap,
integer, dimension( * ) ipiv,
complex, dimension( ldb, * ) b,
integer ldb,
integer info
)
Purpose:
!> CHPTRS solves a system of linear equationsA*X = Bwith a complex !> Hermitian matrixAstored in packed format using the factorization !>A = U*D*U**HorA = L*D*L**Hcomputed byCHPTRF. !>
Like, imagine you already factored your matrix with CHPTRF (thatβs the pregame), and now CHPTRS is the main character energy that actually gives you the solution matrix X. No cap, it eats π₯
Parameters
UPLO
UPLO is CHARACTER*1. It tells us whether the factorization details are stored as an upper or lower triangular matrix, bestie.
= 'U': Upper triangular, form isA = U*D*U**H= 'L': Lower triangular, form isA = L*D*L**H
Pick your vibe, but pick it correctly, iykyk π
N
N is INTEGER. Itβs the order of the matrix A. The rule? N >= 0. Donβt be out here with negative dimensions, thatβs not the move π
NRHS
NRHS is INTEGER. The number of right hand sides, i.e., the number of columns of the matrix B. And yes, NRHS >= 0 β always check before you wreck π
AP
AP is a COMPLEX array, dimension (N*(N+1)/2). It holds the block diagonal matrix D and the multipliers used to obtain the factor U or L as computed by CHPTRF, stored as a packed triangular matrix. Iconic packed storage behavior, honestly π
IPIV
IPIV is an INTEGER array, dimension (N). All the details of the interchanges and the block structure of D as determined by CHPTRF. The receipts are right here, no guessing π§
B
B is a COMPLEX array, dimension (LDB,NRHS).
- On entry, itβs the right hand side matrix
B. You bring the problem. - On exit, itβs the solution matrix
X. It gets the glow-up π
Not me being obsessed with an in-place solution, but here we are π
LDB
LDB is INTEGER. Itβs the leading dimension of the array B, and you must have LDB >= max(1,N). Thatβs not optional, bestie β itβs giving boundary check energy β
INFO
INFO is INTEGER. The tea on how everything went:
= 0: successful exit. Slay.< 0: ifINFO = -i, thei-th argument had an illegal value. So something was off, andINFOis ratting it out π
π Author π
Get into the academic royalty who brought you this:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
The way that this is a whole squad π
Definition at line 114 of file chptrs.f.
π Author (again, sure) π
Generated automatically by Doxygen for LAPACK from the source code. The pipeline ate and left no crumbs π
So yeah, thatβs CHPTRS β solve the system, mind your uplo, keep LDB legal, and let INFO = 0 be your main character moment. Periodt ππ
LAPACK β Version 3.12.0 β big hugs from the chptrs.f file, and thanks for reading this little manual-page moment with me π«Άβ¨πΈ
π¦ 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