PZDRSCL(l)
πΈ 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 indescA[ DT_ ]β the descriptor type. In this case,DT_A = 1.CTXT_A(global) β stored indescA[ 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 indescA[ M_ ]β the number of rows in the global array A.N_A(global) β stored indescA[ N_ ]β the number of columns in the global array A.MB_A(global) β stored indescA[ MB_ ]β the blocking factor used to distribute the rows of the array.NB_A(global) β stored indescA[ NB_ ]β the blocking factor used to distribute the columns of the array.RSRC_A(global) β stored indescA[ RSRC_ ]β the process row over which the first row of the array A is distributed.CSRC_A(global) β stored indescA[ CSRC_ ]β the process column over which the first column of the array A is distributed.LLD_A(local) β stored indescA[ 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 vectorsub( X ).N >= 0. No negatives, babes. π ββοΈSAβ (global input) DOUBLE PRECISION. The scalarawhich is used to divide each component ofsub( X ).SAmust be>= 0, or the subroutine will divide by zero. bestie. do not. πSXβ (local input/local output)COMPLEX*16array 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 vectorsub( 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 ofINCXare supported in this version, namely1andM_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
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms