potrf2(3)

🌸 potrf2 🌸

okay bestie, so you've stumbled into potrf2(3) β€” that's the potrf2 page from the Library Functions Manual, and it is literally the landing page for a whole lil family of routines. it's giving "index card for a friend group" energy πŸ’…

fr fr, the NAME line says exactly this and nothing more:

potrf2 - potrf2: triangular factor panel, recursive?

yes, the question mark is canon. don't come for me, i didn't write it 🫢


✨ SYNOPSIS ✨

πŸŽ€ Functions πŸŽ€

bestie there are four of these and they're all recursive subroutines β€” every single one of them. same argument lineup, four different precision/flavor combos. here's the full roster, no skips, no "and friends":

  • recursive subroutine cpotrf2 (uplo, n, a, lda, info) β€” this one's tagged CPOTRF2 ✨
  • recursive subroutine dpotrf2 (uplo, n, a, lda, info) β€” this one's tagged DPOTRF2... sorry, DPOTRF2 πŸ¦‹
  • recursive subroutine spotrf2 (uplo, n, a, lda, info) β€” this one's tagged SPOTRF2 🌸
  • recursive subroutine zpotrf2 (uplo, n, a, lda, info) β€” and this one's tagged ZPOTRF2 πŸ‘‘

so yeah, every one of them eats the same five things in the same order β€” uplo, n, a, lda, info β€” and every one of them is declared recursive, which is the whole personality of this page honestly. it's giving "i contain multitudes" 😭

ngl the c / d / s / z prefix pattern is the classic BLAS/LAPACK thing where each letter is a different data type, and the tag next to each line is just the uppercase routine name. iykyk πŸ’–

⭐ Detailed Description ⭐

so this is the section where the actual explanation usually lives, and… it's empty. like, genuinely blank. no prose, no notes, no lore. just the heading sitting there with main character energy and zero lines underneath it πŸ’€

we're literally told nothing here beyond what's already above β€” no parameter breakdowns, no return values explained, no caveats, no examples. so bestie, do not go making up what uplo does from this page alone. the page doesn't say. periodt. πŸ™ˆ

heads up: this is only part 1 of the page β€” more is coming, so don't close the tab yet πŸ‘€πŸŽ€

πŸ¦‹ CPOTRF2

recursive subroutine cpotrf2 (character uplo, integer n, complex, dimension( lda, * ) a, integer lda, integer info)

🌟 Purpose

okay so bestie, CPOTRF2 computes the Cholesky factorization of a Hermitian positive definite matrix A using the recursive algorithm πŸ’–

The factorization has the form

   A = U**H * U,  if UPLO = 'U', or
   A = L  * L**H,  if UPLO = 'L',

where U is an upper triangular matrix and L is lower triangular ✨

This is the recursive version of the algorithm β€” it's giving divide-and-conquer main character energy πŸ‘‘ It divides the matrix into four submatrices:

       [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
   A = [ -----|----- ]  with n1 = n/2
       [  A21 | A22  ]       n2 = n-n1

The subroutine calls itself to factor A11. Update and scale A21 or A12, update A22 then calls itself to factor A22 πŸ’…

🌸 Parameters

  • UPLO β€” CHARACTER*1, fr fr tell it which triangle you're handing over:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N β€” INTEGER, the order of the matrix A. N >= 0. ✨
  • A β€” COMPLEX array, dimension (LDA,N) β€” the whole vibe, lowkey:
    • On entry, the Hermitian matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. 🫢
    • On exit, if INFO = 0, the factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H. πŸŽ€
  • LDA β€” INTEGER, the leading dimension of the array A. LDA >= max(1,N). No cap, just rules πŸ’…
  • INFO β€” INTEGER, the receipts:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭
    • > 0: if INFO = i, the leading principal minor of order i is not positive, and the factorization could not be completed πŸ’€

πŸ‘‘ Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 105 of file cpotrf2.f.


πŸ¦‹ DPOTRF2

recursive subroutine dpotrf2 (character uplo, integer n, double precision, dimension( lda, * ) a, integer lda, integer info)

🌟 Purpose

DPOTRF2 computes the Cholesky factorization of a real symmetric positive definite matrix A using the recursive algorithm πŸ’œ yes, the real one, same iconic energy, no imaginary parts invited 🌈

The factorization has the form

   A = U**T * U,  if UPLO = 'U', or
   A = L  * L**T,  if UPLO = 'L',

where U is an upper triangular matrix and L is lower triangular ✨ (note: **T, not **H β€” we're keeping it real over here 😌)

This is the recursive version of the algorithm. It divides the matrix into four submatrices:

       [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
   A = [ -----|----- ]  with n1 = n/2
       [  A21 | A22  ]       n2 = n-n1

The subroutine calls itself to factor A11. Update and scale A21 or A12, update A22 then calls itself to factor A22 🧚 it literally recurses, it ate and left no crumbs πŸ’…

🌸 Parameters

  • UPLO β€” CHARACTER*1, pick your fighter:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N β€” INTEGER, the order of the matrix A. N >= 0. 🌸
  • A β€” DOUBLE PRECISION array, dimension (LDA,N):
    • On entry, the symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. 🫢
    • On exit, if INFO = 0, the factor U or L from the Cholesky factorization A = U**T*U or A = L*L**T. πŸŽ€
  • LDA β€” INTEGER, the leading dimension of the array A. LDA >= max(1,N). ⭐
  • INFO β€” INTEGER, aka the tea:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value πŸ™ˆ
    • > 0: if INFO = i, the leading principal minor of order i is not positive, and the factorization could not be completed πŸ’€

πŸ‘‘ Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 105 of file dpotrf2.f.

πŸ‘‘ Author πŸ‘‘

okay so real talk: nobody hand-wrote this bad boy 😭 it was Generated automatically by Doxygen for LAPACK from the source code β€” like, the docs literally write themselves, main character energy fr fr πŸ’…

so yeah, no mysterious lone genius to thank here, just Doxygen doing its little automated thing for LAPACK, pulling straight from the source code ✨ which honestly? iconic. the source is the moment, the docs just follow 🫢


and that's a wrap bestie!! πŸŽ€ this whole page comes to you courtesy of LAPACK, Version 3.12.0, and it's filed under potrf2(3) β€” so if you ever forget where you read it, that's your girl πŸ’– go forth and factor those matrices, you absolute legend πŸ¦‹β­πŸ‘‘

πŸ“¦ where this page comes from