PCLACGV(l)

πŸ“¦ version 1.5, in ubuntu jammy

πŸ’… PCLACGV β€” the LAPACK auxiliary routine (version 1.5, bestie) ✨

okay so. this is PCLACGV, a LAPACK auxiliary routine, and before you panic: it's literally just conjugating a complex vector of length N. that's it. that's the whole job. but she has layers, so let's get into it. πŸŽ€


🌸 NAME 🌸

PCLACGV β€” conjugate a complex vector of length N, sub( X ), where sub( X ) denotes X(IX,JX:JX+N-1) if INCX = DESCX( M_ ) and X(IX:IX+N-1,JX) if INCX = 1.

also, notes, bestie, because of course there are notes: each global data object is described by an associated description vector. πŸ¦‹


✨ SYNOPSIS ✨

SUBROUTINE PCLACGV( N, X, IX, JX, DESCX, INCX )

    INTEGER         INCX, IX, JX, N

    INTEGER         DESCX( * )

    COMPLEX         X( * )

look at her. six arguments. no notes. πŸ’…


🫢 PURPOSE 🫢

so PCLACGV conjugates a complex vector of length N, sub( X ), where sub( X ) denotes X(IX,JX:JX+N-1) if INCX = DESCX( M_ ) and X(IX:IX+N-1,JX) if INCX = 1 β€” and also the mapping between an object element and its corresponding process and memory location. 🧚

let A be a generic term for any 2D block cyclicly distributed array, okay? such a global array has an associated description vector DESCA. and in the following comments, the character _ should be read as "of the global array". iykyk. πŸ’œ

here's the whole notation situation, laid out as a lil list because we don't do tables in this house:

  • DTYPE_A(global) β€” stored in DESCA( DTYPE_ ) β€” the descriptor type. in this case, DTYPE_A = 1. ⭐
  • CTXT_A (global) β€” stored in DESCA( CTXT_ ) β€” the BLACS context handle, indicating the BLACS process grid A is distributed over. the context itself is global, but the handle (the integer value) may vary. πŸ™ˆ
  • M_A (global) β€” stored in DESCA( M_ ) β€” the number of rows in the global array A.
  • N_A (global) β€” stored in DESCA( N_ ) β€” the number of columns in the global array A.
  • MB_A (global) β€” stored in DESCA( MB_ ) β€” the blocking factor used to distribute the rows of the array.
  • NB_A (global) β€” stored in DESCA( NB_ ) β€” the blocking factor used to distribute the columns of the array.
  • RSRC_A (global) β€” stored in DESCA( RSRC_ ) β€” the process row over which the first row of the array A is distributed.
  • CSRC_A (global) β€” stored in DESCA( CSRC_ ) β€” the process column over which the first column of the array A is distributed.
  • LLD_A (local) β€” stored in DESCA( LLD_ ) β€” the leading dimension of the local array. LLD_A >= MAX(1,LOCr(M_A)). πŸ‘‘

now let K be the number of rows or columns of a distributed matrix, and assume its process grid has dimension p x q.

  • LOCr( K ) denotes the number of elements of K that a process would receive if K were distributed over the p processes of its process column. 🌈
  • similarly, LOCc( K ) denotes the number of elements of K that a process would receive if K were distributed over the q processes of its process row. 🌈

the values of LOCr() and LOCc() may be determined via a call to the ScaLAPACK tool function, NUMROC:

LOCr( M ) = NUMROC( M, MB_A, MYROW, RSRC_A, NPROW ),
LOCc( N ) = NUMROC( N, NB_A, MYCOL, CSRC_A, NPCOL ).

an upper bound for these quantities may be computed by:

LOCr( M ) <= ceil( ceil(M/MB_A)/NPROW )*MB_A
LOCc( N ) <= ceil( ceil(N/NB_A)/NPCOL )*NB_A

and because vectors may be viewed as a subclass of matrices, a distributed vector is considered to be a distributed matrix. no cap, that's literally the rule. πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

  • N β€” (global input) INTEGER β€” the length of the distributed vector sub( X ). short queen, but important. πŸ’–
  • X β€” (local input/local output) COMPLEX pointer into the local memory to an array of dimension (LLD_X,*) β€” on entry, the vector to be conjugated is x( i ) = X(IX+(JX-1)*M_X +(i-1)*INCX ), 1 <= i <= N. on exit: the conjugated vector. she goes in one way and comes out the other way, slay. ✨
  • IX β€” (global input) INTEGER β€” the row index in the global array X indicating the first row of sub( X ). πŸ¦‹
  • JX β€” (global input) INTEGER β€” the column index in the global array X indicating the first column of sub( X ). 🌸
  • DESCX β€” (global and local input) INTEGER array of dimension DLEN_ β€” the array descriptor for the distributed matrix X. the main character, honestly. πŸ‘‘
  • INCX β€” (global input) INTEGER β€” the global increment for the elements of X. only two values of INCX are supported in this version, namely 1 and M_X.
⚠️ okay real talk: INCX must not be zero. like. do not. that's not a vibe, that's undefined-behaviour territory. periodt. πŸ’…

that's the whole page bestie, go conjugate something. 🫢

signing off: this was PCLACGV(l) from LAPACK version 1.5, dated 12 May 1997 β€” yes she's an icon from the 90s and she's still serving. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from