/home/abui...SRC/zhpr.f(3)
π¦ ZHPR β hermitian rank-1 update, the BLAS way π
okay bestie, so this page lives at /home/abui...SRC/zhpr.f(3) in the Library Functions Manual, and it's literally the manual entry for the Fortran source file /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/BLAS/SRC/zhpr.f. yes that path is a whole journey, we're not gonna talk about it π
β¨ SYNOPSIS β¨
Functions/Subroutines, and the icon of the hour is:
subroutine ZHPR (uplo, n, alpha, x, incx, ap)
ZHPR. that's it. that's the name. π
πΈ Function/Subroutine Documentation πΈ
here's the full signature with all the types spelled out, no cap:
subroutine ZHPR (character uplo, integer n, double precision alpha,
complex*16, dimension(*) x, integer incx, complex*16, dimension(*) ap)
ZHPR
π Purpose π
so the doc block says, and I quote:
!>
!> ZHPR performs the hermitian rank 1 operation
!>
!> A := alpha*x*x**H + A,
!>
!> where alpha is a real scalar, x is an n element vector and A is an
!> n by n hermitian matrix, supplied in packed form.
!>
translation: it takes your hermitian matrix A (which is living its best packed life, not a full 2D array), and it adds alpha*x*x**H to it. rank 1 update, hermitian edition, slay π₯ note that alpha is a real scalar here, and x**H is the conjugate transpose. she's doing math.
π§ Parameters π§
UPLOβCHARACTER*1. on entry,UPLOtells the routine whether the upper or lower triangular part ofAis the one supplied in the packed arrayAP, like this:
UPLO = 'U' or 'u' The upper triangular part of A is
supplied in AP.
UPLO = 'L' or 'l' The lower triangular part of A is
supplied in AP.
NβINTEGER. on entry,Nspecifies the order of the matrixA. andNmust be at least zero, so no negative nonsense πALPHAβDOUBLE PRECISION. on entry,ALPHAspecifies the scalaralpha. real one. π«XβCOMPLEX*16array, dimension at least( 1 + ( n - 1 )*abs( INCX ) ). before entry, the incremented arrayXmust contain thenelement vectorx. so yeah, feed her the vector πINCXβINTEGER. on entry,INCXspecifies the increment for the elements ofX.INCXmust not be zero β like, that one is not a vibe, don't do it πAPβCOMPLEX*16array, dimension at least( ( n*( n + 1 ) )/2 ). the packing rules are kinda the whole personality of this routine, so buckle up:- before entry with
UPLO = 'U'or'u', the arrayAPmust contain the upper triangular part of the hermitian matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 1, 2 )anda( 2, 2 )respectively, and so on. on exit, the arrayAPis overwritten by the upper triangular part of the updated matrix. β¨ - before entry with
UPLO = 'L'or'l', the arrayAPmust contain the lower triangular part of the hermitian matrix packed sequentially, column by column, so thatAP( 1 )containsa( 1, 1 ),AP( 2 )andAP( 3 )containa( 2, 1 )anda( 3, 1 )respectively, and so on. on exit, the arrayAPis overwritten by the lower triangular part of the updated matrix. π - note that the imaginary parts of the diagonal elements need not be set β they are assumed to be zero, and on exit they are set to zero. so like, don't stress about 'em, she handles it π«Ά
- before entry with
ok but actually pay attention to theAPpacking and theINCX β 0thing. those are the real ones. the imaginary-diagonal detail is lowkey iconic but also load-bearing.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad fr fr π«Ά
β Further Details β
!>
!> Level 2 Blas routine.
!>
!> -- Written on 22-October-1986.
!> Jack Dongarra, Argonne National Lab.
!> Jeremy Du Croz, Nag Central Office.
!> Sven Hammarling, Nag Central Office.
!> Richard Hanson, Sandia National Labs.
!>
Level 2 BLAS routine, written on 22-October-1986 by Jack Dongarra (Argonne National Lab), Jeremy Du Croz (Nag Central Office), Sven Hammarling (Nag Central Office), and Richard Hanson (Sandia National Labs). 1986!! these legends were out here doing hermitian rank-1 updates before some of us were even born π main character energy, honestly.
π Definition π
definition at line 129 of file zhpr.f.
π Author (the auto-generated one) π
Generated automatically by Doxygen for LAPACK from the source code. not a human, just vibes and a parser π€β¨
LAPACK β Version 3.12.0 β /home/abui...SRC/zhpr.f(3)
and that's the whole page bestie, go forth and pack your triangles correctly ππ¦πΈ
π¦ 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