PZDRSCL(l)

πŸ“¦ version 1.5, in ubuntu jammy

🌸 NAME 🌸

PZDRSCL β€” hi bestie πŸ’– this is the LAPACK auxiliary routine (version 1.5) and its whole personality is: it multiplies an N-element complex distributed vector sub( X ) by the real scalar 1/a. That's the gig. One job, done flawlessly. πŸ‘‘


✨ SYNOPSIS ✨

SUBROUTINE PZDRSCL( N, SA, SX, IX, JX, DESCX, INCX )

    INTEGER         IX, INCX, JX, N

    DOUBLE          PRECISION SA

    INTEGER         DESCX( * )

    COMPLEX*16      SX( * )

πŸŽ€ PURPOSE πŸŽ€

PZDRSCL multiplies an N-element complex distributed vector sub( X ) by the real scalar 1/a. And the way it does it is lowkey genius: it's done without overflow or underflow, as long as the final sub( X )/a does not overflow or underflow. Like, the routine is careful the entire time, but the final result is on you, bestie. πŸ™ˆ

where sub( X ) denotes X(IX:IX+N-1,JX:JX), if INCX = 1,
                       X(IX:IX,JX:JX+N-1), if INCX = M_X.

🧠 Notes 🧠

Every global data object is described by an associated description vector. This vector stores the information required to establish the mapping between an object element and its corresponding process and memory location. It's giving "the map to the treasure", honestly.

Let A be a generic term for any 2D block cyclicly distributed array. Such a global array has an associated description vector descA. In the following comments, the character _ should be read as "of the global array".

  • DT_A (global) β€” stored in descA[ DT_ ] β€” the descriptor type. In this case, DT_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. sneaky but valid ✨
  • 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)).

Let K be the number of rows or columns of a distributed matrix, and assume that 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

Because vectors may be seen as particular matrices, a distributed vector is considered to be a distributed matrix. fr fr, that's the whole lore πŸ¦‹


πŸ‘‘ ARGUMENTS πŸ‘‘

  • N β€” (global input) pointer to INTEGER. The number of components of the distributed vector sub( X ). N >= 0. No negatives, babes. πŸ™…β€β™€οΈ
  • SA β€” (global input) DOUBLE PRECISION. The scalar a which is used to divide each component of sub( X ). SA must be >= 0, or the subroutine will divide by zero. bestie. do not. πŸ’€
  • SX β€” (local input/local output) COMPLEX*16 array containing the local pieces of a distributed matrix of dimension of at least ( (JX-1)*M_X + IX + ( N - 1 )*abs( INCX ) ). This array contains the entries of the distributed vector sub( X ).
  • IX β€” (global input) pointer to INTEGER. The global row index of the submatrix of the distributed matrix X to operate on.
  • JX β€” (global input) pointer to INTEGER. The global column index of the submatrix of the distributed matrix X to operate on.
  • DESCX β€” (global and local input) INTEGER array of dimension 8. The array descriptor of the distributed matrix X.
  • INCX β€” (global input) pointer to INTEGER. The global increment for the elements of X. Only two values of INCX are supported in this version, namely 1 and M_X. just those two. that's the vibe check. ✨

okay that's the whole page, mwah πŸ’…

LAPACK version 1.5, dated 12 May 1997 β€” vintage, iconic, still eating. slay, periodt πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from