CHPTRS(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

✨ 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 equations A*X = B with a complex !> Hermitian matrix A stored in packed format using the factorization !> A = U*D*U**H or A = L*D*L**H computed by CHPTRF. !>

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 is A = U*D*U**H
  • = 'L': Lower triangular, form is A = 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: if INFO = -i, the i-th argument had an illegal value. So something was off, and INFO is 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