SLARHS(3)

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

πŸ’… SLARHS(3) β€” the LAPACK lib function page, but make it make sense

okay so real talk: this is from the Library Functions Manual (the LAPACK one), and it's the page for /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/slarhs.f. Yes the title is literally a whole file path, we don't question the Doxygen overlords 🫢


✨ NAME ✨

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/LIN/slarhs.f β€” that's the file, that's the name, slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

subroutine SLARHS (path, xtype, uplo, trans, m, n, kl, ku, nrhs, a, lda,
    x, ldx, b, ldb, iseed, info)

SLARHS β€” that's the whole vibe, it's the subroutine's name and also its job title 😭


🌸 Function/Subroutine Documentation 🌸

subroutine SLARHS (character*3 path, character xtype, character uplo,
    character trans, integer m, integer n, integer kl, integer ku, integer
    nrhs, real, dimension( lda, * ) a, integer lda, real, dimension( ldx, *
    ) x, integer ldx, real, dimension( ldb, * ) b, integer ldb, integer,
    dimension( 4 ) iseed, integer info)

SLARHS πŸ’–

πŸŽ€ Purpose πŸŽ€

!> !> SLARHS chooses a set of NRHS random solution vectors and sets !> up the right hand sides for the linear system !> op(A) * X = B, !> where op(A) = A or A**T, depending on TRANS. !>

so basically it picks some random solution vectors (NRHS of them, no big deal) and builds the right-hand sides for op(A) * X = B, where op(A) is either A or A**T β€” and which one you get is entirely TRANS's call, iykyk ✨


πŸ‘‘ Parameters πŸ‘‘

PATH

!> PATH is CHARACTER*3 !> The type of the real matrix A. PATH may be given in any !> combination of upper and lower case. Valid types include !> xGE: General m x n matrix !> xGB: General banded matrix !> xPO: Symmetric positive definite, 2-D storage !> xPP: Symmetric positive definite packed !> xPB: Symmetric positive definite banded !> xSY: Symmetric indefinite, 2-D storage !> xSP: Symmetric indefinite packed !> xSB: Symmetric indefinite banded !> xTR: Triangular !> xTP: Triangular packed !> xTB: Triangular banded !> xQR: General m x n matrix !> xLQ: General m x n matrix !> xQL: General m x n matrix !> xRQ: General m x n matrix !> where the leading character indicates the precision. !>

PATH is CHARACTER*3 and it tells you what kind of real matrix A is. Case? Doesn't matter bestie, upper, lower, mix-and-match, PATH is flexible πŸ’… Valid types, in no particular order of iconicness:

  • xGE β€” general m x n matrix
  • xGB β€” general banded matrix
  • xPO β€” symmetric positive definite, 2-D storage
  • xPP β€” symmetric positive definite packed
  • xPB β€” symmetric positive definite banded
  • xSY β€” symmetric indefinite, 2-D storage
  • xSP β€” symmetric indefinite packed
  • xSB β€” symmetric indefinite banded
  • xTR β€” triangular
  • xTP β€” triangular packed
  • xTB β€” triangular banded
  • xQR β€” general m x n matrix
  • xLQ β€” general m x n matrix
  • xQL β€” general m x n matrix
  • xRQ β€” general m x n matrix

and the leading character is the precision, that's the little letter doing all the work up front πŸŽ€

XTYPE

!> XTYPE is CHARACTER*1 !> Specifies how the exact solution X will be determined: !> = 'N': New solution; generate a random X. !> = 'C': Computed; use value of X on entry. !>

CHARACTER*1, and it decides how the exact solution X gets figured out:

  • 'N' β€” New solution, generate a random X 🎲
  • 'C' β€” Computed, use whatever value X had on entry πŸ‘€

UPLO

!> UPLO is CHARACTER*1 !> Specifies whether the upper or lower triangular part of the !> matrix A is stored, if A is symmetric. !> = 'U': Upper triangular !> = 'L': Lower triangular !>

CHARACTER*1, and it says whether the upper or lower triangular part of A is the stored one β€” but only if A is symmetric, so don't come for it otherwise πŸ™ˆ

  • 'U' β€” upper triangular
  • 'L' β€” lower triangular

TRANS

!> TRANS is CHARACTER*1 !> Used only if A is nonsymmetric; specifies the operation !> applied to the matrix A. !> = 'N': B := A * X (No transpose) !> = 'T': B := AT * X (Transpose) !> = 'C': B := AH * X (Conjugate transpose = Transpose) !>

CHARACTER*1, and it only matters if A is nonsymmetric (yes, only then). It picks the operation applied to A:

  • 'N' β€” B := A * X (no transpose)
  • 'T' β€” B := A**T * X (transpose)
  • 'C' β€” B := A**H * X (conjugate transpose = transpose) πŸ’€

M

!> M is INTEGER !> The number or rows of the matrix A. M >= 0. !>

INTEGER. The number of rows of A (the original says "number or rows", we're keeping that typo energy, it's canon πŸ’€). M >= 0.

N

!> N is INTEGER !> The number of columns of the matrix A. N >= 0. !>

INTEGER. Number of columns of A. N >= 0.

KL

!> KL is INTEGER !> Used only if A is a band matrix; specifies the number of !> subdiagonals of A if A is a general band matrix or if A is !> symmetric or triangular and UPLO = 'L'; specifies the number !> of superdiagonals of A if A is symmetric or triangular and !> UPLO = 'U'. 0 <= KL <= M-1. !>

INTEGER, and it's band-matrix-only, so if A isn't banded, this is not your moment. Specifically:

  • if A is a general band matrix, or if A is symmetric/triangular with UPLO = 'L' β†’ number of subdiagonals of A
  • if A is symmetric or triangular and UPLO = 'U' β†’ number of superdiagonals of A

And 0 <= KL <= M-1, periodt πŸ”₯

KU

!> KU is INTEGER !> Used only if A is a general band matrix or if A is !> triangular. !> !> If PATH = xGB, specifies the number of superdiagonals of A, !> and 0 <= KU <= N-1. !> !> If PATH = xTR, xTP, or xTB, specifies whether or not the !> matrix has unit diagonal: !> = 1: matrix has non-unit diagonal (default) !> = 2: matrix has unit diagonal !>

INTEGER, used only if A is a general band matrix or if A is triangular. Two whole personalities depending on PATH:

  • if PATH = xGB β†’ number of superdiagonals of A, and 0 <= KU <= N-1
  • if PATH = xTR, xTP, or xTB β†’ whether the matrix has a unit diagonal:
    • 1 β€” matrix has non-unit diagonal (this is the default, bestie ✨)
    • 2 β€” matrix has unit diagonal

NRHS

!> NRHS is INTEGER !> The number of right hand side vectors in the system A*X = B. !>

INTEGER. How many right-hand-side vectors live in the system A*X = B. That's it, that's the whole job 🫢

A

!> A is REAL array, dimension (LDA,N) !> The test matrix whose type is given by PATH. !>

REAL array, dimension (LDA,N). It's the test matrix, and its whole type/personality is handed to it by PATH πŸ‘‘

LDA

!> LDA is INTEGER !> The leading dimension of the array A. !> If PATH = xGB, LDA >= KL+KU+1. !> If PATH = xPB, xSB, xHB, or xTB, LDA >= KL+1. !> Otherwise, LDA >= max(1,M). !>

INTEGER, the leading dimension of A. The rules, no cap:

  • if PATH = xGB β†’ LDA >= KL+KU+1
  • if PATH = xPB, xSB, xHB, or xTB β†’ LDA >= KL+1
  • otherwise β†’ LDA >= max(1,M)

X

!> X is or output) REAL array, dimension(LDX,NRHS) !> On entry, if XTYPE = 'C' (for 'Computed'), then X contains !> the exact solution to the system of linear equations. !> On exit, if XTYPE = 'N' (for 'New'), then X is initialized !> with random values. !>

X is a REAL array, dimension (LDX,NRHS) β€” input or output, it does both, main character energy πŸ”₯ (the original's parenthetical got a little chewed up in the source, we still love her)

  • On entry, if XTYPE = 'C' (for 'Computed') β†’ X contains the exact solution to the system of linear equations
  • On exit, if XTYPE = 'N' (for 'New') β†’ X is initialized with random values 🎲

LDX

!> LDX is INTEGER !> The leading dimension of the array X. If TRANS = 'N', !> LDX >= max(1,N); if TRANS = 'T', LDX >= max(1,M). !>

INTEGER, leading dimension of X:

  • if TRANS = 'N' β†’ LDX >= max(1,N)
  • if TRANS = 'T' β†’ LDX >= max(1,M)

B

!> B is REAL array, dimension (LDB,NRHS) !> The right hand side vector(s) for the system of equations, !> computed from B = op(A) * X, where op(A) is determined by !> TRANS. !>

REAL array, dimension (LDB,NRHS). The right-hand side vector(s) for the system of equations, computed from B = op(A) * X, and op(A) is whatever TRANS decided it should be. Respect the chain of command πŸ’…

LDB

!> LDB is INTEGER !> The leading dimension of the array B. If TRANS = 'N', !> LDB >= max(1,M); if TRANS = 'T', LDB >= max(1,N). !>

INTEGER, leading dimension of B:

  • if TRANS = 'N' β†’ LDB >= max(1,M)
  • if TRANS = 'T' β†’ LDB >= max(1,N)

ISEED

!> ISEED is INTEGER array, dimension (4) !> The seed vector for the random number generator (used in !> SLATMS). Modified on exit. !>

INTEGER array, dimension (4). The seed vector for the random number generator (it gets used in SLATMS). Heads up bestie: it is modified on exit β€” not your seed anymore after this πŸ’€

INFO

!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !>

INTEGER, the vibe report:

  • 0 β€” successful exit πŸŽ‰
  • < 0 β€” if INFO = -i, then the i-th argument had an illegal value 😭

🧚 Author 🧚

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

absolute legends, all of them πŸ‘‘βœ¨

Definition at line 203 of file slarhs.f.


🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code. (Not a human, just a very enthusiastic robot πŸŽ€)


and that's the page!! it's from LAPACK, Version 3.12.0, footer file /home/abui...IN/slarhs.f(3) β€” mwah, go build some right-hand sides, bestie πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from