SRC/ssyevd.f(3)

πŸ’– SRC/ssyevd.f πŸ’–

okay bestie, gather round, because today we're reading SRC/ssyevd.f from the Library Functions Manual and honestly? it's giving main character energy ✨


🌸 NAME 🌸

SRC/ssyevd.f β€” that's the file, that's the vibe, periodt πŸŽ€


✨ SYNOPSIS ✨

Functions/Subroutines

  • subroutine ssyevd (jobz, uplo, n, a, lda, w, work, lwork, iwork, liwork, info) β€” SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices πŸ’…

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine ssyevd (character jobz, character uplo, integer n, real, dimension( lda, * ) a, integer lda, real, dimension( * ) w, real, dimension( * ) work, integer lwork, integer, dimension( * ) iwork, integer liwork, integer info)

SSYEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices. no cap, that's literally the whole job πŸ‘‘

πŸŽ€ Purpose:

!>
!> SSYEVD computes all eigenvalues and, optionally, eigenvectors of a
!> real symmetric matrix A. If eigenvectors are desired, it uses a
!> divide and conquer algorithm.
!>
!> Because of large use of BLAS of level 3, SSYEVD needs N**2 more
!> workspace than SSYEVX.
!>

so like, real symmetric matrix A, all eigenvalues, eigenvectors if you want them, divide-and-conquer algorithm when you do. and heads up: because it's out here using level-3 BLAS so heavily, SSYEVD needs N**2 more workspace than SSYEVX πŸ’€ plan accordingly.


🧚 Parameters 🧚

  • JOBZ β€” JOBZ is CHARACTER*1
!>          JOBZ is CHARACTER*1
!>          = 'N':  Compute eigenvalues only;
!>          = 'V':  Compute eigenvalues and eigenvectors.
!>

'N' = eigenvalues only, 'V' = eigenvalues and eigenvectors. pick your fighter πŸ’…

  • UPLO β€” UPLO is CHARACTER*1
!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>

'U' = upper triangle of A is the one being stored, 'L' = lower triangle. that's it, that's the whole choice πŸŽ€

  • N β€” N is INTEGER
!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

the order of matrix A, and N >= 0 bestie, don't try anything funny πŸ™ˆ

  • A β€” A is REAL array, dimension (LDA, N)
!>          A is REAL 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.  If UPLO = 'L',
!>          the leading N-by-N lower triangular part of A contains
!>          the lower triangular part of the matrix A.
!>          On exit, if JOBZ = 'V', then if INFO = 0, A contains the
!>          orthonormal eigenvectors of the matrix A.
!>          If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
!>          or the upper triangle (if UPLO='U') of A, including the
!>          diagonal, is destroyed.
!>

on entry it's your symmetric matrix A (upper N-by-N part if UPLO = 'U', lower N-by-N part if UPLO = 'L'). on exit, if JOBZ = 'V' and INFO = 0, A is holding the orthonormal eigenvectors. but if JOBZ = 'N'? 😭 the lower triangle (if UPLO='L') or upper triangle (if UPLO='U') of A, including the diagonal, is straight-up destroyed. gone. she's not coming back. so don't be precious about it πŸ’€

  • LDA β€” LDA is INTEGER
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!>

leading dimension of A, and it's gotta be LDA >= max(1,N) fr fr

  • W β€” W is REAL array, dimension (N)
!>          W is REAL array, dimension (N)
!>          If INFO = 0, the eigenvalues in ascending order.
!>

if INFO = 0, this is your eigenvalues, in ascending order β€” sorted and slaying ✨

  • WORK β€” WORK is REAL array, dimension (MAX(1,LWORK))
!>          WORK is REAL array, dimension (MAX(1,LWORK))
!>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
!>

on exit, if INFO = 0, WORK(1) hands you the optimal LWORK 🫢

  • LWORK β€” LWORK is INTEGER
!>          LWORK is INTEGER
!>          The dimension of the array WORK.
!>          If N <= 1,               LWORK must be at least 1.
!>          If JOBZ = 'N' and N > 1, LWORK must be at least 2*N+1.
!>          If JOBZ = 'V' and N > 1, LWORK must be at least
!>                                                1 + 6*N + 2*N**2.
!>
!>          If LWORK = -1, then a workspace query is assumed; the routine
!>          only calculates the optimal sizes of the WORK and IWORK
!>          arrays, returns these values as the first entries of the WORK
!>          and IWORK arrays, and no error message related to LWORK or
!>          LIWORK is issued by XERBLA.
!>

the dimension of the WORK array. the minimums, bestie:

  • N <= 1 β†’ LWORK must be at least 1
  • JOBZ = 'N' and N > 1 β†’ LWORK must be at least 2*N+1
  • JOBZ = 'V' and N > 1 β†’ LWORK must be at least 1 + 6*N + 2*N**2

and if LWORK = -1 that's a workspace query β€” the routine only computes the optimal sizes of the WORK and IWORK arrays, returns them as the first entries of WORK and IWORK, and XERBLA doesn't yell at you about LWORK or LIWORK. iconic, honestly πŸ‘‘

  • IWORK β€” IWORK is INTEGER array, dimension (MAX(1,LIWORK))
!>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
!>          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
!>

on exit, if INFO = 0, IWORK(1) gives you the optimal LIWORK πŸ’–

  • LIWORK β€” LIWORK is INTEGER
!>          LIWORK is INTEGER
!>          The dimension of the array IWORK.
!>          If N <= 1,                LIWORK must be at least 1.
!>          If JOBZ  = 'N' and N > 1, LIWORK must be at least 1.
!>          If JOBZ  = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
!>
!>          If LIWORK = -1, then a workspace query is assumed; the
!>          routine only calculates the optimal sizes of the WORK and
!>          IWORK arrays, returns these values as the first entries of
!>          the WORK and IWORK arrays, and no error message related to
!>          LWORK or LIWORK is issued by XERBLA.
!>

dimension of IWORK, minimums time:

  • N <= 1 β†’ LIWORK must be at least 1
  • JOBZ = 'N' and N > 1 β†’ LIWORK must be at least 1
  • JOBZ = 'V' and N > 1 β†’ LIWORK must be at least 3 + 5*N

and LIWORK = -1 means a workspace query again β€” same deal, it just reports optimal sizes in the first entries of WORK and IWORK, and XERBLA stays quiet about LWORK and LIWORK πŸ¦‹

  • INFO β€” INFO is INTEGER
!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  if INFO = i and JOBZ = 'N', then the algorithm failed
!>                to converge; i off-diagonal elements of an intermediate
!>                tridiagonal form did not converge to zero;
!>                if INFO = i and JOBZ = 'V', then the algorithm failed
!>                to compute an eigenvalue while working on the submatrix
!>                lying in rows and columns INFO/(N+1) through
!>                mod(INFO,N+1).
!>

the tea β˜•:

  • = 0 β†’ successful exit, we ate πŸ’…
  • < 0 β†’ if INFO = -i, the i-th argument had an illegal value (you did that πŸ™ˆ)
  • > 0 β†’ if INFO = i and JOBZ = 'N', the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero
  • > 0 and JOBZ = 'V' β†’ the algorithm failed to compute an eigenvalue while working on the submatrix lying in rows and columns INFO/(N+1) through mod(INFO,N+1)
lowkey if you see a positive INFO, that's not a slay, that's a "the algorithm gave up" moment 😭

πŸ‘‘ Author πŸ‘‘

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

the whole squad showed up 🫢


🌈 Contributors: 🌈

  • Jeff Rutter, Computer Science Division, University of California at Berkeley, USA
  • Modified by Francoise Tisseur, University of Tennessee
  • Modified description of INFO. Sven, 16 Feb 05.

shoutout Sven for the INFO glow-up on 16 Feb 05, we love an editor πŸ’œ


⭐ Definition at line 173 of file ssyevd.f. ⭐

that's where the magic lives, iykyk πŸ“


🌸 Author 🌸

Generated automatically by Doxygen for LAPACK from the source code. not a human, just a robot doing her little thing πŸ€–βœ¨


and that's the whole page, bestie!! LAPACK Version 3.12.0 β€” SRC/ssyevd.f(3) β€” that's the footer, we mention it, we respect it, we close the tab πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from